mirror of
https://github.com/signalapp/Signal-Server.git
synced 2026-12-01 13:46:47 +00:00
Add an API endpoint for deleting accounts.
This commit is contained in:
1 parent
61f515670c
commit
a553eba574
2 files changed
+34
-2
No files matched your search
+14
@@ -482,6 +482,13 @@ public class AccountController {
|
||||
directoryQueue.refreshRegisteredUser(account);
|
||||
}
|
||||
|
||||
@GET
|
||||
@Path("/me")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public AccountCreationResult getMe(@Auth Account account) {
|
||||
return whoAmI(account);
|
||||
}
|
||||
|
||||
@GET
|
||||
@Path("/whoami")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
@@ -593,6 +600,13 @@ public class AccountController {
|
||||
return new CaptchaRequirement(false, false);
|
||||
}
|
||||
|
||||
@Timed
|
||||
@DELETE
|
||||
@Path("/me")
|
||||
public void deleteAccount(@Auth Account account) {
|
||||
accounts.delete(account);
|
||||
}
|
||||
|
||||
private boolean shouldAutoBlock(String requester) {
|
||||
try {
|
||||
rateLimiters.getAutoBlockLimiter().validate(requester);
|
||||
|
||||
Reference in new issue
Block a user