This commit is contained in:
@@ -101,7 +101,7 @@ namespace AyaNova.Api.Controllers
|
||||
if (n == null)
|
||||
return BadRequest(new ApiErrorResponse(ApiErrorCode.NOT_FOUND, "id"));
|
||||
if (n.UserId != UserId)
|
||||
return BadRequest(new ApiErrorResponse(ApiErrorCode.NOT_AUTHORIZED, "UserId", "Can't delete notification for another user"));
|
||||
return BadRequest(new ApiErrorResponse(ApiErrorCode.NOT_AUTHORIZED, null, "Can't delete notification for another user"));
|
||||
ct.Notification.Remove(n);
|
||||
await ct.SaveChangesAsync();
|
||||
return NoContent();
|
||||
|
||||
Reference in New Issue
Block a user