message: refactor(server default apps): clean default apps update implementation
diff: @@ -60,7 +60,7 @@ async function updateDefaultApp(app, existingApp) {
  .where({ appId: app.id })
  .pluck('tokenId')
  - try {
  + // the internal code block makes sure if an error occurred, the trx gets rolled back
  await knex.transaction(async (trx) => {
  // add new scopes to the app
  if (newScopes.length)
  @@ -95,23 +95,7 @@ async function updateDefaultApp(app, existingApp) {
  )
  delete app.scopes
  await Apps().where({ id: app.id }).update(app).transacting(trx)
  - // throw new Error('just to test, that nothing changes with the trx rollback')
  })
  - } catch (error) {
  - console.error(error)
  - }
  -
  - // const scopeDiffA = app.scopes.filter(
  - // (scope) => existingApp.scopes.indexOf(scope) === -1
  - // )
  - // const scopeDiffB = existingApp.scopes.filter(
  - // (scope) => app.scopes.indexOf(scope) === -1
  - // )
  -
  - // if (scopeDiffA.length !== 0 || scopeDiffB.length !== 0) {
  - // const scopes = app.scopes.map((s) => ({ appId: app.id, scopeName: s }))
  - // await AppScopes().insert(scopes)
  - // }
  }
  // this is exported to be able to test the retention of permissions
  @@ -138,7 +122,6 @@ const SpeckleApiExplorer = {
  public: true,
  redirectUrl: new URL('/explorer', process.env.CANONICAL_URL).toString(),
  scopes: 'all'
  - // scopes: [ScopesConst.Streams.Read]
  }
  const SpeckleDesktopApp = {
  