diff --git a/src/commands/checkin.ts b/src/commands/checkin.ts index ea0ea57..315c366 100644 --- a/src/commands/checkin.ts +++ b/src/commands/checkin.ts @@ -3,13 +3,11 @@ import {tokenFlags} from '../token-flags' import {checkin} from '../kingoftime' export default class Checkout extends Command { - static description = 'Check in' + static description = 'Check in'; - static examples = [ - '<%= config.bin %> <%= command.id %>', - ] + static examples = ['<%= config.bin %> <%= command.id %>']; - static flags = tokenFlags + static flags = tokenFlags; public async run(): Promise { const {flags} = await this.parse(Checkout) diff --git a/src/commands/checkout.ts b/src/commands/checkout.ts index c376037..8f80565 100644 --- a/src/commands/checkout.ts +++ b/src/commands/checkout.ts @@ -3,13 +3,11 @@ import {tokenFlags} from '../token-flags' import {checkout} from '../kingoftime' export default class Checkout extends Command { - static description = 'Check out' + static description = 'Check out'; - static examples = [ - '<%= config.bin %> <%= command.id %>', - ] + static examples = ['<%= config.bin %> <%= command.id %>']; - static flags = tokenFlags + static flags = tokenFlags; public async run(): Promise { const {flags} = await this.parse(Checkout) diff --git a/src/kingoftime.ts b/src/kingoftime.ts index 501aa83..14f0115 100644 --- a/src/kingoftime.ts +++ b/src/kingoftime.ts @@ -3,7 +3,11 @@ import axios from 'axios' const CHECK_IN_ID = 'qmXXCxw9WEWN3X/YrkMWuQ==' const CHECK_OUT_ID = 'j8ekmJaw6W3M4w3i6hlSIQ==' -async function kingoftime(operationId: string, token: string, userToken: string) { +async function kingoftime( + operationId: string, + token: string, + userToken: string, +) { const response = await axios({ method: 'post', // url: 'https://s2.kingtime.jp/gateway/bprgateway', @@ -27,7 +31,9 @@ export async function checkin(token: string, userToken: string): Promise { await kingoftime(CHECK_IN_ID, token, userToken) } -export async function checkout(token: string, userToken: string): Promise { +export async function checkout( + token: string, + userToken: string, +): Promise { await kingoftime(CHECK_OUT_ID, token, userToken) } -