Added inauthenticated user handling to createSceneRevision.
This commit is contained in:
@@ -17,7 +17,6 @@ import initLogger from './logger.js';
|
||||
import { curateRevision } from './revisions.js';
|
||||
import { getAffiliateSceneUrl } from './affiliates.js';
|
||||
import { censor } from './censor.js';
|
||||
import initSceneRevisions from '../common/scenes-revisions.mjs';
|
||||
|
||||
const logger = initLogger();
|
||||
const mj = new MerkleJson();
|
||||
@@ -757,20 +756,6 @@ export async function fetchSceneRevisions(revisionId, filters = {}, reqUser) {
|
||||
};
|
||||
}
|
||||
|
||||
const { createSceneRevision, reviewSceneRevision } = initSceneRevisions({
|
||||
config,
|
||||
knex,
|
||||
mj,
|
||||
logger,
|
||||
fetchScenesById,
|
||||
});
|
||||
|
||||
export {
|
||||
createSceneRevision,
|
||||
reviewSceneRevision,
|
||||
};
|
||||
|
||||
/*
|
||||
const keyMap = {
|
||||
datePrecision: 'date_precision',
|
||||
productionDate: 'production_date',
|
||||
@@ -947,6 +932,10 @@ export async function reviewSceneRevision(revisionId, isApproved, { feedback },
|
||||
}
|
||||
|
||||
export async function createSceneRevision(sceneId, { edits, comment, apply }, reqUser) {
|
||||
if (!reqUser) {
|
||||
throw new HttpError('Must be authenticated to create scene revision', 401);
|
||||
}
|
||||
|
||||
const [
|
||||
[scene],
|
||||
openRevisions,
|
||||
@@ -1058,4 +1047,3 @@ export async function createSceneRevision(sceneId, { edits, comment, apply }, re
|
||||
reviewSceneRevision(revisionEntry.id, true, {}, reqUser).catch(() => {});
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
2
static
2
static
Submodule static updated: 4c6f9888dc...d77e9faeb9
Reference in New Issue
Block a user