format
This commit is contained in:
parent
71078c95a4
commit
e6817ffbb2
3 changed files with 15 additions and 13 deletions
|
@ -3,13 +3,11 @@ import {tokenFlags} from '../token-flags'
|
||||||
import {checkin} from '../kingoftime'
|
import {checkin} from '../kingoftime'
|
||||||
|
|
||||||
export default class Checkout extends Command {
|
export default class Checkout extends Command {
|
||||||
static description = 'Check in'
|
static description = 'Check in';
|
||||||
|
|
||||||
static examples = [
|
static examples = ['<%= config.bin %> <%= command.id %>'];
|
||||||
'<%= config.bin %> <%= command.id %>',
|
|
||||||
]
|
|
||||||
|
|
||||||
static flags = tokenFlags
|
static flags = tokenFlags;
|
||||||
|
|
||||||
public async run(): Promise<void> {
|
public async run(): Promise<void> {
|
||||||
const {flags} = await this.parse(Checkout)
|
const {flags} = await this.parse(Checkout)
|
||||||
|
|
|
@ -3,13 +3,11 @@ import {tokenFlags} from '../token-flags'
|
||||||
import {checkout} from '../kingoftime'
|
import {checkout} from '../kingoftime'
|
||||||
|
|
||||||
export default class Checkout extends Command {
|
export default class Checkout extends Command {
|
||||||
static description = 'Check out'
|
static description = 'Check out';
|
||||||
|
|
||||||
static examples = [
|
static examples = ['<%= config.bin %> <%= command.id %>'];
|
||||||
'<%= config.bin %> <%= command.id %>',
|
|
||||||
]
|
|
||||||
|
|
||||||
static flags = tokenFlags
|
static flags = tokenFlags;
|
||||||
|
|
||||||
public async run(): Promise<void> {
|
public async run(): Promise<void> {
|
||||||
const {flags} = await this.parse(Checkout)
|
const {flags} = await this.parse(Checkout)
|
||||||
|
|
|
@ -3,7 +3,11 @@ import axios from 'axios'
|
||||||
const CHECK_IN_ID = 'qmXXCxw9WEWN3X/YrkMWuQ=='
|
const CHECK_IN_ID = 'qmXXCxw9WEWN3X/YrkMWuQ=='
|
||||||
const CHECK_OUT_ID = 'j8ekmJaw6W3M4w3i6hlSIQ=='
|
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({
|
const response = await axios({
|
||||||
method: 'post',
|
method: 'post',
|
||||||
// url: 'https://s2.kingtime.jp/gateway/bprgateway',
|
// url: 'https://s2.kingtime.jp/gateway/bprgateway',
|
||||||
|
@ -27,7 +31,9 @@ export async function checkin(token: string, userToken: string): Promise<void> {
|
||||||
await kingoftime(CHECK_IN_ID, token, userToken)
|
await kingoftime(CHECK_IN_ID, token, userToken)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function checkout(token: string, userToken: string): Promise<void> {
|
export async function checkout(
|
||||||
|
token: string,
|
||||||
|
userToken: string,
|
||||||
|
): Promise<void> {
|
||||||
await kingoftime(CHECK_OUT_ID, token, userToken)
|
await kingoftime(CHECK_OUT_ID, token, userToken)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue