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