api cleanup
This commit is contained in:
parent
0745ccf995
commit
0a7bfce95b
2 changed files with 3 additions and 3 deletions
|
|
@ -105,7 +105,7 @@ export const fetchUserByName = ({ name, credentials }) =>
|
|||
})
|
||||
.then(({ data }) => data.id)
|
||||
.catch((error) => {
|
||||
if (error && error.statusCode === 404) {
|
||||
if (error?.statusCode === 404) {
|
||||
// Either the backend does not support lookup endpoint,
|
||||
// or there is no user with such name. Fallback and treat name as id.
|
||||
return name
|
||||
|
|
|
|||
|
|
@ -613,7 +613,7 @@ export const listAliases = ({ credentials }) =>
|
|||
method: 'GET',
|
||||
credentials,
|
||||
params: {
|
||||
_cacheBooster: new Date().getTime(),
|
||||
_cacheBooster: Date().now(),
|
||||
},
|
||||
})
|
||||
|
||||
|
|
@ -799,7 +799,7 @@ export const listBackups = ({ credentials }) =>
|
|||
method: 'GET',
|
||||
credentials,
|
||||
params: {
|
||||
_cacheBooster: new Date().getTime(),
|
||||
_cacheBooster: Date().now(),
|
||||
},
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue