[backend/api] Fix emoji delete endpoint having emoji twice in the route
This commit is contained in:
parent
fdf879d63b
commit
e30dbc5753
1 changed files with 11 additions and 11 deletions
|
@ -105,16 +105,16 @@ public class EmojiController(
|
|||
return Ok(await emojiSvc.CloneEmoji(emojo));
|
||||
}
|
||||
|
||||
[HttpPost("import")]
|
||||
[Authorize("role:admin")]
|
||||
[ProducesResponseType(StatusCodes.Status202Accepted)]
|
||||
public async Task<IActionResult> ImportEmoji(IFormFile file, [FromServices] EmojiImportService emojiImportSvc)
|
||||
{
|
||||
var zip = await emojiImportSvc.Parse(file.OpenReadStream());
|
||||
await emojiImportSvc.Import(zip); // TODO: run in background. this will take a while
|
||||
[HttpPost("import")]
|
||||
[Authorize("role:admin")]
|
||||
[ProducesResponseType(StatusCodes.Status202Accepted)]
|
||||
public async Task<IActionResult> ImportEmoji(IFormFile file, [FromServices] EmojiImportService emojiImportSvc)
|
||||
{
|
||||
var zip = await emojiImportSvc.Parse(file.OpenReadStream());
|
||||
await emojiImportSvc.Import(zip); // TODO: run in background. this will take a while
|
||||
|
||||
return Accepted();
|
||||
}
|
||||
return Accepted();
|
||||
}
|
||||
|
||||
[HttpPatch("{id}")]
|
||||
[Authorize("role:admin")]
|
||||
|
@ -143,7 +143,7 @@ public class EmojiController(
|
|||
return Ok(res);
|
||||
}
|
||||
|
||||
[HttpDelete("emoji/{id}")]
|
||||
[HttpDelete("{id}")]
|
||||
[Authorize("role:admin")]
|
||||
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||
[ProducesResponseType(StatusCodes.Status404NotFound, Type = typeof(ErrorResponse))]
|
||||
|
|
Loading…
Add table
Reference in a new issue