fix ts request cli (#4461)

Co-authored-by: robinzhang <azhangrongbing@163.com>
This commit is contained in:
Robin 2024-11-21 21:40:08 +08:00 committed by GitHub
parent 7c8f41d577
commit cad243905f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -32,7 +32,7 @@ export function parseParams(url: string): Array<string> {
* @param url
* @param params
*/
export function genUrl(url: string, params: unknown) {
export function genUrl(url: string, params: any) {
if (!params) {
return url;
}
@ -113,7 +113,7 @@ export const webapi = {
return api<T>('delete', url, req, config);
},
put<T>(url: string, req: unknown, config?: unknown): Promise<T> {
return api<T>('get', url, req, config);
return api<T>('put', url, req, config);
},
post<T>(url: string, req: unknown, config?: unknown): Promise<T> {
return api<T>('post', url, req, config);