mirror of https://github.com/bitwarden/cli.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
501 B
18 lines
501 B
import * as program from 'commander'; |
|
|
|
import { SyncService } from 'jslib/abstractions/sync.service'; |
|
|
|
import { Response } from '../models/response'; |
|
|
|
export class SyncCommand { |
|
constructor(private syncService: SyncService) { } |
|
|
|
async run(cmd: program.Command): Promise<Response> { |
|
try { |
|
const result = await this.syncService.fullSync(cmd.force || false); |
|
return Response.success(); |
|
} catch (e) { |
|
return Response.error(e); |
|
} |
|
} |
|
}
|
|
|