Iceshrimp.NET/Iceshrimp.Frontend/Core/ControllerModels/FollowRequestControllerModel.cs
2024-07-05 04:09:25 +02:00

14 lines
No EOL
616 B
C#

using Iceshrimp.Frontend.Core.Miscellaneous;
using Iceshrimp.Frontend.Core.Services;
using Iceshrimp.Shared.Schemas.Web;
namespace Iceshrimp.Frontend.Core.ControllerModels;
internal class FollowRequestControllerModel(ApiClient api)
{
public Task<List<FollowRequestResponse>> GetFollowRequests(PaginationQuery pq) =>
api.Call<List<FollowRequestResponse>>(HttpMethod.Get, "/follow_requests", pq);
public Task AcceptFollowRequest(string id) => api.Call(HttpMethod.Post, $"/follow_requests/{id}/accept");
public Task RejectFollowRequest(string id) => api.Call(HttpMethod.Post, $"/follow_requests/{id}/reject");
}