fix(xo-server/store): store.get returns a promise (#4776)
Fixes xoa-support#2137
This commit is contained in:
parent
e6c8d6cc7d
commit
cb16438b1c
@ -11,6 +11,8 @@
|
||||
|
||||
> Users must be able to say: “I had this issue, happy to know it's fixed”
|
||||
|
||||
- [Self,IP pools] Fixed the creation being stuck and freezing XO (PR [#4776](https://github.com/vatesfr/xen-orchestra/pull/4776))
|
||||
|
||||
### Released packages
|
||||
|
||||
> Packages will be released in the order they are here, therefore, they should
|
||||
|
@ -4,7 +4,7 @@ import { ensureDir } from 'fs-extra'
|
||||
|
||||
// ===================================================================
|
||||
|
||||
const _levelHas = function has(key, cb) {
|
||||
const _levelHas = async function has(key, cb) {
|
||||
if (cb) {
|
||||
return this.get(key, (error, value) =>
|
||||
error ? (error.notFound ? cb(null, false) : cb(error)) : cb(null, true)
|
||||
@ -12,7 +12,7 @@ const _levelHas = function has(key, cb) {
|
||||
}
|
||||
|
||||
try {
|
||||
this.get(key)
|
||||
await this.get(key)
|
||||
return true
|
||||
} catch (error) {
|
||||
if (!error.notFound) {
|
||||
|
Loading…
Reference in New Issue
Block a user