Skip to content

Commit

Permalink
BC-8924 Remove code for edu-sharing v6 (#5495)
Browse files Browse the repository at this point in the history
  • Loading branch information
dyedwiper authored Feb 6, 2025
1 parent ce69bcb commit 447d2e3
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 605 deletions.
7 changes: 1 addition & 6 deletions config/default.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -945,11 +945,6 @@
"description": "The password for edu-sharing api access",
"default": ""
},
"ES_API_V7": {
"type": "boolean",
"default": false,
"description": "Use the newer API for Edusharing v7"
},
"FEATURE_ES_MERLIN_ENABLED": {
"type": "boolean",
"default": false,
Expand Down Expand Up @@ -1372,7 +1367,7 @@
"default": 300000,
"description": "threshold in milliseconds to try again to process a hanging Pending or Failed deletion requests"
},
"DELETION_CONSIDER_FAILED_AFTER_MS" : {
"DELETION_CONSIDER_FAILED_AFTER_MS": {
"type": "number",
"default": 360000000,
"description": "threshold in milliseconds to stop trying to process Pending or Failed deletion requests"
Expand Down
22 changes: 4 additions & 18 deletions src/services/edusharing/index.js
Original file line number Diff line number Diff line change
@@ -1,40 +1,26 @@
/* eslint-disable max-classes-per-file */
const { MethodNotAllowed } = require('@feathersjs/errors');
const { static: staticContent } = require('@feathersjs/express');
const { Configuration } = require('@hpi-schul-cloud/commons/lib');
const path = require('path');

const hooks = require('./hooks');
const playerHooks = require('./hooks/player.hooks');
const merlinHooks = require('./hooks/merlin.hooks');
const EduSharingConnectorV6 = require('./services/EduSharingConnectorV6');
const EduSharingConnectorV7 = require('./services/EduSharingConnectorV7');
const eduSharingConnectorV7 = require('./services/EduSharingConnectorV7');
const MerlinTokenGenerator = require('./services/MerlinTokenGenerator');

class EduSharing {
constructor() {
if (Configuration.get('ES_API_V7')) {
this.connector = EduSharingConnectorV7;
} else {
this.connector = EduSharingConnectorV6;
}
}

find(params) {
return this.connector.FIND(params.query, params.authentication.payload.schoolId);
return eduSharingConnectorV7.FIND(params.query, params.authentication.payload.schoolId);
}

get(id, params) {
return this.connector.GET(id, params.authentication.payload.schoolId);
return eduSharingConnectorV7.GET(id, params.authentication.payload.schoolId);
}
}

class EduSharingPlayer {
get(uuid) {
if (!Configuration.get('ES_API_V7')) {
throw new MethodNotAllowed('This feature is disabled on this instance');
}
const esPlayer = EduSharingConnectorV7.getPlayerForNode(uuid);
const esPlayer = eduSharingConnectorV7.getPlayerForNode(uuid);

return esPlayer;
}
Expand Down
332 changes: 0 additions & 332 deletions src/services/edusharing/services/EduSharingConnectorV6.js

This file was deleted.

Loading

0 comments on commit 447d2e3

Please sign in to comment.