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