feat: show error message when oauth callback error (#34)

* feat: show error message when oauth callback error

* fix: checkstyle
This commit is contained in:
vran
2022-03-05 13:09:03 +08:00
committed by GitHub
parent 842643ea4f
commit f2a7019ec4
5 changed files with 26 additions and 11 deletions

View File

@@ -29,9 +29,7 @@ public class OauthAppDao extends BaseDao<OauthAppPojo> {
}
public OauthAppPojo selectByRegistrationId(String registrationId) {
return this.getDslContext()
.select(OAUTH_APP.fields()).from(OAUTH_APP).where(OAUTH_APP.REGISTRATION_ID.eq(registrationId))
.fetchOptionalInto(OauthAppPojo.class)
return this.selectOptionByRegistrationId(registrationId)
.orElseThrow(() -> new DataNotExistsException("can not found oauth app by " + registrationId));
}
}