mirror of
https://github.com/bitwarden/browser
synced 2025-12-13 23:03:32 +00:00
19 lines
501 B
TypeScript
19 lines
501 B
TypeScript
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(false);
|
|
return Response.success();
|
|
} catch (e) {
|
|
return Response.success(e.toString());
|
|
}
|
|
}
|
|
}
|