Add UAPI changes

This commit is contained in:
Rory&
2026-02-28 14:02:29 +01:00
parent f65f11720e
commit c2734d1c65
2 changed files with 6 additions and 4 deletions

View File

@@ -35,15 +35,15 @@ public class ApplicationRpcController : ControllerBase {
public class ApplicationDisclosures {
[JsonPropertyName("disclosures")]
public List<ApplicationDisclosures.Type> Disclosures { get; set; }
public List<ApplicationDisclosureType> Disclosures { get; set; }
[JsonPropertyName("acked_disclosures")]
public List<ApplicationDisclosures.Type> AckedDisclosures { get; set; }
public List<ApplicationDisclosureType> AckedDisclosures { get; set; }
[JsonPropertyName("all_acked")]
public bool AllAcked { get; set; }
public enum Type {
public enum ApplicationDisclosureType {
UnspecifiedDisclosure = 0,
IpLocation = 1,
DisplaysAdvertisements = 2,

View File

@@ -4,12 +4,13 @@ using Spacebar.Models.Db.Contexts;
using Spacebar.Models.Db.Models;
using Spacebar.UApi.Controllers.Messages;
using Spacebar.UApi.Services;
using Config = Spacebar.ConfigModel.Config;
namespace Spacebar.UApi.Controllers;
[ApiController]
[Route("/api/v{_}/guilds/{guildId}/stickers/")]
public class GuildStickerController(ILogger<MessagesController> logger, SpacebarDbContext db, SpacebarAspNetAuthenticationService authService, UApiConfiguration cfg, PermissionService permService) : ControllerBase {
public class GuildStickerController(ILogger<MessagesController> logger, SpacebarDbContext db, SpacebarAspNetAuthenticationService authService, UApiConfiguration cfg, PermissionService permService, Config sbCfg) : ControllerBase {
// TODO proper response type
[HttpPost]
public async Task<Sticker> UploadGuildSticker(string guildId, MultipartFormDataContent content) {
@@ -31,6 +32,7 @@ public class GuildStickerController(ILogger<MessagesController> logger, Spacebar
break;
case "file":
var fileContent = await item.ReadAsStreamAsync();
break;
}
}