21 lines
470 B
JavaScript
21 lines
470 B
JavaScript
const {Command} = require('@oclif/core')
|
|
const {tokenFlags} = require('../tokenFlags')
|
|
const {checkout} = require('../kingoftime')
|
|
|
|
class CheckoutCommand extends Command {
|
|
static description = 'Check out'
|
|
|
|
static examples = [
|
|
'<%= config.bin %> <%= command.id %>',
|
|
]
|
|
|
|
static flags = tokenFlags
|
|
|
|
async run() {
|
|
const {flags} = await this.parse(CheckoutCommand)
|
|
await checkout(flags.token, flags['user-token'])
|
|
}
|
|
}
|
|
|
|
module.exports = CheckoutCommand
|