mirror of https://github.com/fantasticit/think.git
Merge pull request #19 from fantasticit/feat/share
This commit is contained in:
commit
e49645ff1c
|
@ -4,9 +4,9 @@ export const buildUrl = (url) => {
|
|||
};
|
||||
|
||||
export const getWikiShareURL = (wikiId) => {
|
||||
return window.location.host + '/share/wiki/' + wikiId;
|
||||
return window.location.origin + '/share/wiki/' + wikiId;
|
||||
};
|
||||
|
||||
export const getDocumentShareURL = (documentId) => {
|
||||
return window.location.host + '/share/document/' + documentId;
|
||||
return window.location.origin + '/share/document/' + documentId;
|
||||
};
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { IDocument } from '@think/domains';
|
||||
import { IDocument, IUser, IWiki } from '@think/domains';
|
||||
import { HttpClient } from './HttpClient';
|
||||
|
||||
/**
|
||||
|
@ -19,7 +19,7 @@ export const updateDocumentViews = (id: string) => {
|
|||
export const getPublicDocumentDetail = (
|
||||
id: string,
|
||||
data: Partial<Pick<IDocument, 'sharePassword'>>
|
||||
): Promise<IDocument> => {
|
||||
): Promise<IDocument & { createUse: IUser; wiki: IWiki }> => {
|
||||
return HttpClient.post('/document/public/detail/' + id, data);
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue