1
0
Fork 0
mirror of synced 2024-06-17 18:04:42 +12:00

Explicitly passing requested appId when calling updateAppPackage

This commit is contained in:
Dean 2022-05-25 15:10:37 +01:00
parent 58cfc29dc5
commit e86dce30e3
2 changed files with 5 additions and 1 deletions

View file

@ -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)

View file

@ -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 }