feat: self-service deletion API, reactivate account page

This commit is contained in:
sam 2024-12-19 16:13:05 +01:00
parent 8a2ffd7d69
commit 96725cc304
Signed by: sam
GPG key ID: B4EF20DDE721CAA1
13 changed files with 183 additions and 17 deletions

View file

@ -17,7 +17,7 @@ public class NotificationsController(
{
[HttpGet]
[Authorize("user.moderation")]
[Limit(UsableBySuspendedUsers = true)]
[Limit(UsableByDeletedUsers = true)]
public async Task<IActionResult> GetNotificationsAsync([FromQuery] bool all = false)
{
IQueryable<Notification> query = db.Notifications.Where(n => n.TargetId == CurrentUser!.Id);
@ -31,7 +31,7 @@ public class NotificationsController(
[HttpPut("{id}/ack")]
[Authorize("user.moderation")]
[Limit(UsableBySuspendedUsers = true)]
[Limit(UsableByDeletedUsers = true)]
public async Task<IActionResult> AcknowledgeNotificationAsync(Snowflake id)
{
Notification? notification = await db.Notifications.FirstOrDefaultAsync(n =>