refactor(frontend): adapt to RESTful API routes

This commit is contained in:
qzl
2026-02-26 14:28:58 +08:00
parent 5b8b584013
commit d635d9a5e0
16 changed files with 210 additions and 115 deletions
+24
View File
@@ -63,4 +63,28 @@ class ApiClient {
throw ApiException.fromDioError(e);
}
}
Future<Response<T>> patch<T>(
String path, {
dynamic data,
Options? options,
}) async {
try {
return await _dio.patch<T>(path, data: data, options: options);
} on DioException catch (e) {
throw ApiException.fromDioError(e);
}
}
Future<Response<T>> delete<T>(
String path, {
dynamic data,
Options? options,
}) async {
try {
return await _dio.delete<T>(path, data: data, options: options);
} on DioException catch (e) {
throw ApiException.fromDioError(e);
}
}
}