Skip to content
This repository has been archived by the owner on May 11, 2021. It is now read-only.

Commit

Permalink
feat(profile-controller): add getCurrency endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
dmorenogogoleva committed Apr 9, 2019
1 parent 455c4a8 commit 8e39c4d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions back/src/user/presentation/http/controller/ProfileController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,18 @@ export class ProfileController {
return this.getResponseByLogin('email@email.com')
}

@Get('/user/profile/currency')
@ApiOperation({ title: 'Show user currency' })
@ApiOkResponse({
description: 'Fetching user currency success',
type: ProfileResponse,
})
public async getUserCurrency(
@CurrentUser() user: TokenPayload,
): Promise<ProfileResponse> {
return this.getResponseByLogin(user.login)
}

@PostNoCreate('/set-currency/:currency')
@ApiOperation({ title: 'Set default currency' })
@ApiOkResponse({
Expand Down

0 comments on commit 8e39c4d

Please sign in to comment.