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