Files
immich/server/src/commands/oauth-login.ts

33 lines
775 B
TypeScript
Raw Normal View History

import { Command, CommandRunner } from 'nest-commander';
2024-05-22 16:23:47 -04:00
import { CliService } from 'src/services/cli.service';
@Command({
name: 'enable-oauth-login',
description: 'Enable OAuth login',
})
export class EnableOAuthLogin extends CommandRunner {
2024-05-22 16:23:47 -04:00
constructor(private service: CliService) {
super();
}
async run(): Promise<void> {
2024-05-22 16:23:47 -04:00
await this.service.enableOAuthLogin();
console.log('OAuth login has been enabled.');
}
}
@Command({
name: 'disable-oauth-login',
description: 'Disable OAuth login',
})
export class DisableOAuthLogin extends CommandRunner {
2024-05-22 16:23:47 -04:00
constructor(private service: CliService) {
super();
}
async run(): Promise<void> {
2024-05-22 16:23:47 -04:00
await this.service.disableOAuthLogin();
console.log('OAuth login has been disabled.');
}
}