diff --git a/frontend/src/api/share.ts b/frontend/src/api/share.ts index 553c9228..4f6d6566 100644 --- a/frontend/src/api/share.ts +++ b/frontend/src/api/share.ts @@ -4,7 +4,7 @@ export async function list() { return fetchJSON("/api/shares"); } -export async function get(url: apiUrl) { +export async function get(url: ApiUrl) { url = removePrefix(url); return fetchJSON(`/api/share${url}`); } @@ -16,7 +16,7 @@ export async function remove(hash: string) { } export async function create( - url: apiUrl, + url: ApiUrl, password = "", expires = "", unit = "hours" @@ -40,6 +40,6 @@ export async function create( }); } -export function getShareURL(share: share) { +export function getShareURL(share: IShare) { return createURL("share/" + share.hash, {}, false); } diff --git a/frontend/src/types/api.d.ts b/frontend/src/types/api.d.ts index 02251bcc..26e47248 100644 --- a/frontend/src/types/api.d.ts +++ b/frontend/src/types/api.d.ts @@ -25,7 +25,7 @@ type algo = any; type inline = any; -interface share { +interface IShare { expire: any; hash: string; path: string;