Fix minor bug in put share-url api call
This commit is contained in:
parent
5646fff10b
commit
a6a4ecbf46
|
@ -620,21 +620,23 @@ export const deleteShareableURL = async (collection: Collection) => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export const updateShareableURL = async (request: UpdatePublicURL) => {
|
export const updateShareableURL = async (
|
||||||
|
request: UpdatePublicURL
|
||||||
|
): Promise<PublicURL> => {
|
||||||
try {
|
try {
|
||||||
const token = getToken();
|
const token = getToken();
|
||||||
if (!token) {
|
if (!token) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
await HTTPService.put(
|
const res = await HTTPService.put(
|
||||||
`${ENDPOINT}/collections/share-url/`,
|
`${ENDPOINT}/collections/share-url`,
|
||||||
request,
|
request,
|
||||||
null,
|
null,
|
||||||
null,
|
|
||||||
{
|
{
|
||||||
'X-Auth-Token': token,
|
'X-Auth-Token': token,
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
return res.data as PublicURL;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
logError(e, 'updateShareableURL failed ');
|
logError(e, 'updateShareableURL failed ');
|
||||||
throw e;
|
throw e;
|
||||||
|
|
Loading…
Reference in a new issue