2023-04-14 15:14:07 +00:00
|
|
|
import {Command} from '@oclif/core'
|
|
|
|
import {tokenFlags} from '../tokenFlags'
|
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 {
|
|
|
|
static description = 'Check in'
|
2023-04-14 13:21:21 +00:00
|
|
|
|
|
|
|
static examples = [
|
|
|
|
'<%= config.bin %> <%= command.id %>',
|
|
|
|
]
|
|
|
|
|
2023-04-14 15:14:07 +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
|
|
|
}
|
|
|
|
}
|