feat: self-service deletion API, reactivate account page
This commit is contained in:
parent
8a2ffd7d69
commit
96725cc304
13 changed files with 183 additions and 17 deletions
|
@ -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 =>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue