Fixed some typings
This commit is contained in:
parent
cafdfe66f3
commit
d791e79cf3
@ -4,7 +4,7 @@ export async function list() {
|
|||||||
return fetchJSON("/api/shares");
|
return fetchJSON("/api/shares");
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function get(url: apiUrl) {
|
export async function get(url: ApiUrl) {
|
||||||
url = removePrefix(url);
|
url = removePrefix(url);
|
||||||
return fetchJSON(`/api/share${url}`);
|
return fetchJSON(`/api/share${url}`);
|
||||||
}
|
}
|
||||||
@ -16,7 +16,7 @@ export async function remove(hash: string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export async function create(
|
export async function create(
|
||||||
url: apiUrl,
|
url: ApiUrl,
|
||||||
password = "",
|
password = "",
|
||||||
expires = "",
|
expires = "",
|
||||||
unit = "hours"
|
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);
|
return createURL("share/" + share.hash, {}, false);
|
||||||
}
|
}
|
||||||
|
|||||||
2
frontend/src/types/api.d.ts
vendored
2
frontend/src/types/api.d.ts
vendored
@ -25,7 +25,7 @@ type algo = any;
|
|||||||
|
|
||||||
type inline = any;
|
type inline = any;
|
||||||
|
|
||||||
interface share {
|
interface IShare {
|
||||||
expire: any;
|
expire: any;
|
||||||
hash: string;
|
hash: string;
|
||||||
path: string;
|
path: string;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user