using Iceshrimp.Frontend.Core.Services; using Iceshrimp.Shared.Schemas.Web; using Microsoft.AspNetCore.Components.Forms; namespace Iceshrimp.Frontend.Core.ControllerModels; internal class DriveControllerModel(ApiClient api) { public Task UploadFileAsync(IBrowserFile file) => api.CallAsync(HttpMethod.Post, "/drive", data: file); public Task GetFileAsync(string id) => api.CallNullableAsync(HttpMethod.Get, $"/drive/{id}"); public Task UpdateFileAsync(string id, UpdateDriveFileRequest request) => api.CallNullableAsync(HttpMethod.Patch, $"/drive/{id}", data: request); }