wiki/server/graph/resolvers/page.js
/**
     * FETCH LATEST VERSION FOR CONFLICT COMPARISON
     */
FETCH LATEST VERSION FOR CONFLICT COMPARISON
FETCH LATEST VERSION FOR CONFLICT COMPARISON
async conflictLatest (obj, args, context, info) {
      let page = await WIKI.models.pages.getPageFromDb(args.id)
      if (page) {
        if (WIKI.auth.checkAccess(context.req.user, ['write:pages', 'manage:pages'], {
          path: page.path,
          locale: page.localeCode
        })) {
          return {
            ...page,
            tags: page.tags.map(t => t.tag),
            locale: page.localeCode
          }
        } else {
          throw new WIKI.Error.PageViewForbidden()
        }
      } else {
        throw new WIKI.Error.PageNotFound()
      }
    }
async conflictLatest ( obj , args , context , info ) { let page = await WIKI . models . pages . getPageFromDb ( args . id ) if ( page ) { if ( WIKI . auth . checkAccess ( context . req . user , [ 'write:pages' , 'manage:pages' ] , { path : page . path , locale : page . localeCode } ) ) { return { ... page , tags : page . tags . map ( t => t . tag ) , locale : page . localeCode } } else { throw new WIKI . Error . PageViewForbidden ( ) } } else { throw new WIKI . Error . PageNotFound ( ) } }
FETCH LATEST VERSION FOR CONFLICT COMPARISON
FETCH LATEST VERSION FOR CONFLICT COMPARISON