mirror of
https://github.com/immich-app/immich
synced 2025-06-09 05:58:04 +00:00
33 lines
775 B
TypeScript
33 lines
775 B
TypeScript
import { Command, CommandRunner } from 'nest-commander';
|
|
import { CliService } from 'src/services/cli.service';
|
|
|
|
@Command({
|
|
name: 'enable-oauth-login',
|
|
description: 'Enable OAuth login',
|
|
})
|
|
export class EnableOAuthLogin extends CommandRunner {
|
|
constructor(private service: CliService) {
|
|
super();
|
|
}
|
|
|
|
async run(): Promise<void> {
|
|
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 {
|
|
constructor(private service: CliService) {
|
|
super();
|
|
}
|
|
|
|
async run(): Promise<void> {
|
|
await this.service.disableOAuthLogin();
|
|
console.log('OAuth login has been disabled.');
|
|
}
|
|
}
|