mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-21 07:48:02 +01:00
Add an API endpoint for deleting accounts.
This commit is contained in:
committed by
Jon Chambers
parent
61f515670c
commit
a553eba574
@@ -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