Compare commits

...

3 Commits

Author SHA1 Message Date
Adam Millerchip dff7814d5d update to version that is actually used 2023-04-27 00:30:46 +09:00
Adam Millerchip cd57d0d5b1 Use actual URL 2023-04-27 00:30:46 +09:00
Adam Millerchip e6817ffbb2 format 2023-04-27 00:30:46 +09:00
3 changed files with 17 additions and 16 deletions

View File

@ -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<void> {
const {flags} = await this.parse(Checkout)

View File

@ -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<void> {
const {flags} = await this.parse(Checkout)

View File

@ -3,11 +3,14 @@ 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',
url: 'https://httpbin.org/anything',
url: 'https://s2.ta.kingoftime.jp/gateway/bprgateway',
headers: {
Accept: 'application/json, text/javascript, */*; q=0.01',
},
@ -16,7 +19,7 @@ async function kingoftime(operationId: string, token: string, userToken: string)
highAccuracyFlg: 'false',
credential_code: '40', // eslint-disable-line camelcase
user_token: userToken, // eslint-disable-line camelcase
version: '1.4.2',
version: '1.4.16',
token: token,
}),
})
@ -27,7 +30,9 @@ export async function checkin(token: string, userToken: string): Promise<void> {
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)
}