added put shortcut

This commit is contained in:
2023-02-17 14:40:34 +10:00
parent 127fea1dfd
commit c18d7c56c1

View File

@@ -183,6 +183,11 @@ export const api = {
return await this.send(options); return await this.send(options);
}, },
put: async function (options: ApiOptions): Promise<ApiResponse> {
options.method = "PUT";
return await this.send(options);
},
delete: async function (options: ApiOptions): Promise<ApiResponse> { delete: async function (options: ApiOptions): Promise<ApiResponse> {
options.method = "DELETE"; options.method = "DELETE";
return await this.send(options); return await this.send(options);