mirror of
https://github.com/spacebarchat/server.git
synced 2026-03-30 13:55:39 +00:00
Add UAPI changes
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user