feat: show error message when oauth callback error

This commit is contained in:
vran
2022-03-05 13:06:30 +08:00
parent 842643ea4f
commit cb95c30553
5 changed files with 27 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));
}
}