Skip to content

Commit

Permalink
feat: adds email verification field
Browse files Browse the repository at this point in the history
  • Loading branch information
metabacalhau committed Jul 2, 2024
1 parent f6e3bdf commit 31a807d
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
> 4 October 2022
- remove use of dynamic strict in the es mapping [`#93`](https://github.com/nevermined-io/marketplace-api/pull/93)
- Added new _nvm config mapping [`#92`](https://github.com/nevermined-io/marketplace-api/pull/92)
- Added new \_nvm config mapping [`#92`](https://github.com/nevermined-io/marketplace-api/pull/92)
- switch to yarn [`#91`](https://github.com/nevermined-io/marketplace-api/pull/91)
- rename `Nvm` to `NvmConfig` [`9b12183`](https://github.com/nevermined-io/marketplace-api/commit/9b12183e30364061c6b019f174cf6bb11ffd2b14)

Expand Down
5 changes: 2 additions & 3 deletions src/assets/asset.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -314,9 +314,8 @@ export class AssetController {
async getDDOMetadata(@Param('did') did: string): Promise<AttributesDto> {
const assetSource = await this.assetService.findOneById(did)

const metada = GetAssetDto.fromSource(assetSource).service?.find(
(s) => s.attributes,
)?.attributes
const metada = GetAssetDto.fromSource(assetSource).service?.find((s) => s.attributes)
?.attributes

if (!metada) {
throw new NotFoundException(`Asset with did ${did} doesn't have metada`)
Expand Down
9 changes: 9 additions & 0 deletions src/user-profiles/dto/create-user-profile.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,15 @@ export class CreateUserProfileDto {
@IsEmail()
email: string

@ApiProperty({
example: true,
description: 'Flag identifying if the user email is verified. Possible values: true or false',
required: false,
})
@IsOptional()
@IsBoolean()
emailVerified: boolean

@ApiProperty({
example: AdditionalInformation,
description: 'List of additional key-value attributes with additional information',
Expand Down
9 changes: 9 additions & 0 deletions src/user-profiles/dto/update-user-profile.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,15 @@ export class UpdateUserProfileDto {
@IsEmail()
email: string

@ApiProperty({
example: true,
description: 'Flag identifying if the user email is verified. Possible values: true or false',
required: false,
})
@IsOptional()
@IsBoolean()
emailVerified: boolean

@ApiProperty({
example: AdditionalInformation,
description: 'List of additional key-value attributes with additional information',
Expand Down
1 change: 1 addition & 0 deletions src/user-profiles/user-profile.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export class UserProfile {
nickname: string
name: string
email: string
emailVerified: boolean
creationDate: Date
updateDate: Date
additionalInformation: AdditionalInformation
Expand Down

0 comments on commit 31a807d

Please sign in to comment.