refactor(GroupApi): 重构群组禁言接口

- 将 POST 请求改为 GET 请求
-移除 @FormUrlEncoded 注解
- 使用 @Query 注解替换 @Field 注解
This commit is contained in:
yutou 2025-02-10 20:18:45 +08:00
parent b55991798f
commit bc483e50b5

View File

@ -6,9 +6,7 @@ import com.yutou.napcat.model.GroupUserBean;
import com.yutou.okhttp.BaseBean;
import com.yutou.okhttp.HttpBody;
import retrofit2.Call;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;
import retrofit2.http.*;
import java.util.List;
@ -20,12 +18,11 @@ public interface GroupApi {
* @param user 用户
* @param duration 禁言时长单位秒
*/
@FormUrlEncoded
@POST("/set_group_ban")
@GET("/set_group_ban")
Call<HttpBody<BaseBean>> groupBan(
@Field("group_id") long group,
@Field("user_id") long user,
@Field("duration") long duration
@Query("group_id") long group,
@Query("user_id") long user,
@Query("duration") long duration
);
/**