Add the TOS API.
This commit is contained in:
@@ -63,5 +63,7 @@ public interface IStorage {
|
||||
|
||||
void acceptTerm(String token, String url);
|
||||
|
||||
void deleteAccepts(String token);
|
||||
|
||||
boolean isTermAccepted(String token, List<PolicyConfig.PolicyObject> policies);
|
||||
}
|
||||
|
||||
@@ -294,6 +294,14 @@ public class OrmLiteSqlStorage implements IStorage {
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteAccepts(String token) {
|
||||
withCatcher(() -> {
|
||||
AccountDao account = findAccount(token).orElseThrow(InvalidCredentialsException::new);
|
||||
acceptedDao.delete(acceptedDao.queryForEq("userId", account.getUserId()));
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isTermAccepted(String token, List<PolicyConfig.PolicyObject> policies) {
|
||||
return withCatcher(() -> {
|
||||
|
||||
Reference in New Issue
Block a user