mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-17 13:05:32 +09:00
feat(admin)!: move the admin api to rest and fix its defects (#2515)
This commit is contained in:
1 parent
a70924d4b0
commit
7f8f09ee51
143 files changed
+15238
-12790
No files matched your search
@@ -5,14 +5,14 @@ use super::types::{LimitConfigResponse, LimitConfigUpdateRequest};
|
||||
|
||||
impl AdminApiClient {
|
||||
pub async fn get_limit_config(&self) -> ApiResult<LimitConfigResponse> {
|
||||
self.post("/admin/limit-config/get", Some(&serde_json::json!({})))
|
||||
.await
|
||||
self.get("/admin/limit-config", None).await
|
||||
}
|
||||
|
||||
pub async fn update_limit_config(
|
||||
&self,
|
||||
request: &LimitConfigUpdateRequest,
|
||||
) -> ApiResult<LimitConfigResponse> {
|
||||
self.post_typed("/admin/limit-config/update", request).await
|
||||
self.put_typed_with_reason("/admin/limit-config", request, None)
|
||||
.await
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user