2023-04-14 15:14:07 +00:00
|
|
|
import {Command} from '@oclif/core'
|
2023-04-14 16:50:13 +00:00
|
|
|
import {tokenFlags} from '../token-flags'
|
2023-04-14 16:39:52 +00:00
|
|
|
import {checkin} from '../kingoftime'
|
2023-04-14 13:21:21 +00:00
|
|
|
|
2023-04-14 15:14:07 +00:00
|
|
|
export default class Checkout extends Command {
|
2023-04-26 15:30:46 +00:00
|
|
|
static description = 'Check in';
|
2023-04-14 13:21:21 +00:00
|
|
|
|
2023-04-26 15:30:46 +00:00
|
|
|
static examples = ['<%= config.bin %> <%= command.id %>'];
|
2023-04-14 13:21:21 +00:00
|
|
|
|
2023-04-26 15:30:46 +00:00
|
|
|
static flags = tokenFlags;
|
2023-04-14 13:21:21 +00:00
|
|
|
|
|
|
|
public async run(): Promise<void> {
|
2023-04-14 15:14:07 +00:00
|
|
|
const {flags} = await this.parse(Checkout)
|
2023-04-14 16:39:52 +00:00
|
|
|
await checkin(flags.token, flags['user-token'])
|
2023-04-14 13:21:21 +00:00
|
|
|
}
|
|
|
|
}
|