-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
74 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from './login.command.handler' | ||
export * from './user-logout.command.handler' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { ICommandHandler, CommandHandler } from '@nestjs/cqrs' | ||
import { lastValueFrom } from 'rxjs' | ||
import { IAuthUserEntityForResponse, LocalLoginAction } from '../../../domain' | ||
import { LoginCommand } from '../login.command' | ||
|
||
@CommandHandler(LoginCommand) | ||
export class LoginCommandHandler | ||
implements ICommandHandler<LoginCommand, IAuthUserEntityForResponse> | ||
{ | ||
public constructor(protected readonly action: LocalLoginAction) {} | ||
|
||
public async execute(query: LoginCommand) { | ||
return lastValueFrom(this.action.handle(query.input)) | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
src/application/actions/handlers/user-logout.command.handler.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { CommandHandler, ICommandHandler } from '@nestjs/cqrs' | ||
import { lastValueFrom } from 'rxjs' | ||
import { LogoutAction } from '../../../domain' | ||
import { UserLogoutCommand } from '../user-logout.command' | ||
|
||
@CommandHandler(UserLogoutCommand) | ||
export class UserLogoutCommandHandler | ||
implements ICommandHandler<UserLogoutCommand, void> | ||
{ | ||
public constructor(protected readonly action: LogoutAction) {} | ||
|
||
public async execute(query: UserLogoutCommand): Promise<void> { | ||
return lastValueFrom(this.action.handle(query)) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from './login.command' | ||
export * from './user-logout.command' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { AuthDto } from '../../domain' | ||
|
||
export class LoginCommand { | ||
public constructor(public readonly input: AuthDto) {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { ExecutionContext } from '@nestjs/common' | ||
|
||
export class UserLogoutCommand { | ||
public constructor(public readonly context: ExecutionContext) {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,2 @@ | ||
export * from './get-current-user-by-access-token.query.handler' | ||
export * from './get-current-user-by-refresh-token.query.handler' | ||
export * from './login.query.handler' | ||
export * from './user-logout.query.handler' |
This file was deleted.
Oops, something went wrong.
15 changes: 0 additions & 15 deletions
15
src/application/queries/handlers/user-logout.query.handler.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,2 @@ | ||
export * from './get-current-user-by-access-token.query' | ||
export * from './get-current-user-by-refresh-token.query' | ||
export * from './login.query' | ||
export * from './user-logout.query' |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters