diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2022-02-13 23:34:25 -0800 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2022-02-13 23:34:25 -0800 |
commit | 1c73bae2e23242673e0a07cdbc2493700f134ceb (patch) | |
tree | d1105368628b5f64fabb657682df58f1641e4d54 /src/main/java/org/traccar/api/resource/PasswordResource.java | |
parent | de110b28ce8adb6ba875d88ede6e8f86dae4dd48 (diff) | |
download | trackermap-server-1c73bae2e23242673e0a07cdbc2493700f134ceb.tar.gz trackermap-server-1c73bae2e23242673e0a07cdbc2493700f134ceb.tar.bz2 trackermap-server-1c73bae2e23242673e0a07cdbc2493700f134ceb.zip |
New storage implementation
Diffstat (limited to 'src/main/java/org/traccar/api/resource/PasswordResource.java')
-rw-r--r-- | src/main/java/org/traccar/api/resource/PasswordResource.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/org/traccar/api/resource/PasswordResource.java b/src/main/java/org/traccar/api/resource/PasswordResource.java index 1868a6191..0642ff3cc 100644 --- a/src/main/java/org/traccar/api/resource/PasswordResource.java +++ b/src/main/java/org/traccar/api/resource/PasswordResource.java @@ -21,6 +21,7 @@ import org.traccar.api.BaseResource; import org.traccar.model.User; import org.traccar.notification.NotificationMessage; import org.traccar.notification.TextTemplateFormatter; +import org.traccar.storage.StorageException; import javax.annotation.security.PermitAll; import javax.mail.MessagingException; @@ -31,7 +32,6 @@ import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; -import java.sql.SQLException; import java.util.UUID; @Path("password") @@ -44,7 +44,7 @@ public class PasswordResource extends BaseResource { @Path("reset") @PermitAll @POST - public Response reset(@FormParam("email") String email) throws SQLException, MessagingException { + public Response reset(@FormParam("email") String email) throws StorageException, MessagingException { for (long userId : Context.getUsersManager().getAllItems()) { User user = Context.getUsersManager().getById(userId); if (email.equals(user.getEmail())) { @@ -66,7 +66,7 @@ public class PasswordResource extends BaseResource { @PermitAll @POST public Response update( - @FormParam("token") String token, @FormParam("password") String password) throws SQLException { + @FormParam("token") String token, @FormParam("password") String password) throws StorageException { for (long userId : Context.getUsersManager().getAllItems()) { User user = Context.getUsersManager().getById(userId); if (token.equals(user.getString(PASSWORD_RESET_TOKEN))) { |