Explicitly passing requested appId when calling updateAppPackage
This commit is contained in:
parent
959e8de94d
commit
756f5b3aa6
|
@ -297,6 +297,10 @@ function getContextDB(key, opts) {
|
|||
toUseAppId = getDevelopmentAppID(appId)
|
||||
break
|
||||
}
|
||||
|
||||
//If the appId is specified, override context
|
||||
toUseAppId = opts?.appId ? opts?.appId : toUseAppId
|
||||
|
||||
db = dangerousGetDB(toUseAppId, opts)
|
||||
try {
|
||||
cls.setOnContext(key, db)
|
||||
|
|
|
@ -502,7 +502,7 @@ export const sync = async (ctx: any, next: any) => {
|
|||
}
|
||||
|
||||
const updateAppPackage = async (appPackage: any, appId: any) => {
|
||||
const db = getAppDB()
|
||||
const db = getAppDB({ appId })
|
||||
const application = await db.get(DocumentTypes.APP_METADATA)
|
||||
|
||||
const newAppPackage = { ...application, ...appPackage }
|
||||
|
|
Loading…
Reference in New Issue