[frontend/core] Add version controller model

This commit is contained in:
Lilian 2024-11-06 01:07:23 +01:00
parent 69f0727138
commit fa1590512f
No known key found for this signature in database
2 changed files with 11 additions and 0 deletions

View file

@ -0,0 +1,10 @@
using Iceshrimp.Frontend.Core.Services;
using Iceshrimp.Shared.Schemas.Web;
namespace Iceshrimp.Frontend.Core.ControllerModels;
internal class VersionControllerModel(ApiClient api)
{
public Task<VersionResponse> GetVersion() =>
api.Call<VersionResponse>(HttpMethod.Get, "/version");
}

View file

@ -18,6 +18,7 @@ internal class ApiService(ApiClient client)
public readonly MiscControllerModel Misc = new(client); public readonly MiscControllerModel Misc = new(client);
public readonly ProfileControllerModel Profile = new(client); public readonly ProfileControllerModel Profile = new(client);
public readonly FilterControllerModel Filters = new(client); public readonly FilterControllerModel Filters = new(client);
public readonly VersionControllerModel Version = new(client);
public void SetBearerToken(string token) => client.SetToken(token); public void SetBearerToken(string token) => client.SetToken(token);
} }