mirror of
https://github.com/bitwarden/directory-connector
synced 2026-01-17 07:53:19 +00:00
* [deps]: Update angular-eslint monorepo to v17.5.3 * Run npm prettier --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Rui Tome <rtome@bitwarden.com>
21 lines
577 B
TypeScript
21 lines
577 B
TypeScript
import { Response } from "@/jslib/node/src/cli/models/response";
|
|
import { MessageResponse } from "@/jslib/node/src/cli/models/response/messageResponse";
|
|
|
|
import { AuthService } from "../abstractions/auth.service";
|
|
|
|
export class LogoutCommand {
|
|
constructor(
|
|
private authService: AuthService,
|
|
private logoutCallback: () => Promise<void>,
|
|
) {}
|
|
|
|
async run() {
|
|
await this.logoutCallback();
|
|
this.authService.logOut(() => {
|
|
/* Do nothing */
|
|
});
|
|
const res = new MessageResponse("You have logged out.", null);
|
|
return Response.success(res);
|
|
}
|
|
}
|