fix: update dependencies to latest

This commit is contained in:
Divlo
2023-01-11 17:39:09 +01:00
parent b5089f7f0b
commit cd1a477324
31 changed files with 1243 additions and 17860 deletions

View File

@ -1,12 +1,12 @@
import axios from 'axios'
export const API_VERSION = '1.2.3'
export const API_VERSION = '1.2.4'
export const API_DEFAULT_PORT = 8080
export const API_URL =
process.env.NEXT_PUBLIC_API_URL != null
? process.env.NEXT_PUBLIC_API_URL
process.env['NEXT_PUBLIC_API_URL'] != null
? process.env['NEXT_PUBLIC_API_URL']
: `http://127.0.0.1:${API_DEFAULT_PORT}`
export const api = axios.create({

View File

@ -59,7 +59,9 @@ export class Authentication {
this.setAccessToken(accessToken)
}
config.headers = config.headers == null ? {} : config.headers
config.headers.Authorization = `${this.tokens.type} ${this.tokens.accessToken}`
config.headers[
'Authorization'
] = `${this.tokens.type} ${this.tokens.accessToken}`
return config
},
async (error) => {
@ -96,7 +98,7 @@ export class Authentication {
this.accessTokenAge = Date.now()
const token = `${this.tokens.type} ${this.tokens.accessToken}`
if (typeof this?.socket?.auth !== 'function' && this.socket != null) {
this.socket.auth.token = token
this.socket.auth['token'] = token
}
}