aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared
diff options
context:
space:
mode:
Diffstat (limited to 'shared')
-rw-r--r--shared/extra-utils/users/users.ts7
-rw-r--r--shared/models/users/user.model.ts1
2 files changed, 6 insertions, 2 deletions
diff --git a/shared/extra-utils/users/users.ts b/shared/extra-utils/users/users.ts
index c09211b71..1c39881d6 100644
--- a/shared/extra-utils/users/users.ts
+++ b/shared/extra-utils/users/users.ts
@@ -323,13 +323,16 @@ function askSendVerifyEmail (url: string, email: string) {
323 }) 323 })
324} 324}
325 325
326function verifyEmail (url: string, userId: number, verificationString: string, statusCodeExpected = 204) { 326function verifyEmail (url: string, userId: number, verificationString: string, isPendingEmail = false, statusCodeExpected = 204) {
327 const path = '/api/v1/users/' + userId + '/verify-email' 327 const path = '/api/v1/users/' + userId + '/verify-email'
328 328
329 return makePostBodyRequest({ 329 return makePostBodyRequest({
330 url, 330 url,
331 path, 331 path,
332 fields: { verificationString }, 332 fields: {
333 verificationString,
334 isPendingEmail
335 },
333 statusCodeExpected 336 statusCodeExpected
334 }) 337 })
335} 338}
diff --git a/shared/models/users/user.model.ts b/shared/models/users/user.model.ts
index 2f6a3c719..b5823b47a 100644
--- a/shared/models/users/user.model.ts
+++ b/shared/models/users/user.model.ts
@@ -9,6 +9,7 @@ export interface User {
9 id: number 9 id: number
10 username: string 10 username: string
11 email: string 11 email: string
12 pendingEmail: string | null
12 emailVerified: boolean 13 emailVerified: boolean
13 nsfwPolicy: NSFWPolicyType 14 nsfwPolicy: NSFWPolicyType
14 15