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

With unread notifications

This commit is contained in:
Zhiyuan Zheng
2020-12-24 10:28:51 +01:00
parent 4461cd1fa4
commit b5f267e6bf
6 changed files with 109 additions and 32 deletions

View File

@ -1,6 +1,9 @@
import axios from 'axios'
import chalk from 'chalk'
import { store, RootState } from '@root/store'
const ctx = new chalk.Instance({ level: 3 })
const client = async ({
method,
instance,
@ -25,13 +28,13 @@ const client = async ({
onUploadProgress?: (progressEvent: any) => void
}): Promise<any> => {
console.log(
'API call:',
'Method ->',
method,
'Endpoint ->',
url,
'Params ->',
params
ctx.bgGreen.bold(' API ') +
' ' +
method +
ctx.green(' -> ') +
`/${url}` +
(params ? ctx.green(' -> ') : ''),
params ? params : ''
)
const state: RootState['instances'] = store.getState().instances
const domain =