mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 22:30:31 +00:00
feat: wip email confirmation
This commit is contained in:
@@ -13,14 +13,12 @@ export class AuthSignupConfirmResend {
|
||||
* @param {number} tenantId
|
||||
* @param {string} email
|
||||
*/
|
||||
public async signUpConfirmResend(email: string) {
|
||||
const user = await SystemUser.query()
|
||||
.findOne({ email })
|
||||
.throwIfNotFound();
|
||||
public async signUpConfirmResend(userId: number) {
|
||||
const user = await SystemUser.query().findById(userId).throwIfNotFound();
|
||||
|
||||
//
|
||||
//
|
||||
if (user.verified) {
|
||||
throw new ServiceError(ERRORS.USER_ALREADY_VERIFIED)
|
||||
throw new ServiceError(ERRORS.USER_ALREADY_VERIFIED);
|
||||
}
|
||||
if (user.verifyToken) {
|
||||
throw new ServiceError(ERRORS.USER_ALREADY_VERIFIED);
|
||||
|
||||
Reference in New Issue
Block a user