add delete
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@kevisual/api",
|
"name": "@kevisual/api",
|
||||||
"version": "0.0.29",
|
"version": "0.0.30",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "mod.ts",
|
"main": "mod.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -79,6 +79,14 @@ export class QueryResources {
|
|||||||
body: formData,
|
body: formData,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
async deleteFile(filepath: string, opts?: DataOpts): Promise<Result<any>> {
|
||||||
|
const url = `${this.prefix}${filepath}`;
|
||||||
|
return adapter({
|
||||||
|
url,
|
||||||
|
method: 'DELETE' as any,
|
||||||
|
headers: this.header(opts?.headers),
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export const getContentType = (filename: string): string => {
|
export const getContentType = (filename: string): string => {
|
||||||
|
|||||||
Reference in New Issue
Block a user