think/packages/client/src/services/document.ts

25 lines
527 B
TypeScript
Raw Normal View History

2022-02-20 11:51:55 +00:00
import { IDocument } from "@think/share";
import { HttpClient } from "./HttpClient";
/**
*
* @param id
* @returns
*/
export const updateDocumentViews = (id: string) => {
return HttpClient.get("/document/views/" + id);
};
/**
*
* @param id
* @param data
* @returns
*/
export const getPublicDocumentDetail = (
id: string,
data: Partial<Pick<IDocument, "sharePassword">>
): Promise<IDocument> => {
return HttpClient.post("/document/public/detail/" + id, data);
};