1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00

Partially fixed #113

This commit is contained in:
Zhiyuan Zheng
2021-05-09 21:59:03 +02:00
parent 006edd5c87
commit 0b659913dc
62 changed files with 2308 additions and 703 deletions

View File

@ -6,7 +6,7 @@ const ctx = new chalk.Instance({ level: 3 })
export type Params = {
method: 'get' | 'post' | 'put' | 'delete'
domain?: string
domain: string
url: string
params?: {
[key: string]: string | number | boolean | string[] | number[] | boolean[]
@ -25,10 +25,6 @@ const apiGeneral = async <T = unknown>({
body,
sentry = false
}: Params): Promise<{ body: T }> => {
if (!domain) {
return Promise.reject()
}
console.log(
ctx.bgGreen.bold(' API general ') +
' ' +

View File

@ -6,7 +6,7 @@ import li from 'li'
const ctx = new chalk.Instance({ level: 3 })
export type Params = {
method: 'get' | 'post' | 'put' | 'delete'
method: 'get' | 'post' | 'put' | 'delete' | 'patch'
version?: 'v1' | 'v2'
url: string
params?: {