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:
@ -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 ') +
|
||||
' ' +
|
||||
|
@ -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?: {
|
||||
|
Reference in New Issue
Block a user