Skip to content

Commit

Permalink
renamed iamge service to v1
Browse files Browse the repository at this point in the history
  • Loading branch information
theorm committed Jan 17, 2025
1 parent e245116 commit b0eb55a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const {
SolrNamespaces,
} = require('../../solr')

class Service {
export default class Service {
constructor({ app = null, name = '' }) {
this.app = app
this.name = name
Expand Down Expand Up @@ -285,9 +285,3 @@ class Service {
return { id }
}
}

module.exports = function (options) {
return new Service(options)
}

module.exports.Service = Service
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export default {
},
randomPage: {
required: false,
transform: d => ['true', ''].includes(d),
transform: (d: string) => ['true', ''].includes(d),
},
facets: utils.facets({
values: {
Expand Down
9 changes: 4 additions & 5 deletions src/services/images/images.service.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
// Initializes the `images` service on path `/images`
import hooks from './images.hooks'
const createService = require('./images.class.js')
import hooksV1 from './images-v1.hooksoks'
import ServiceV1 from './images-v1.class'

module.exports = function (app) {
// Initialize our service with any options it requires
app.use(
'/images',
createService({
new ServiceV1({
app,
name: 'images',
})
Expand All @@ -15,5 +14,5 @@ module.exports = function (app) {
// Get our initialized service so that we can register hooks
const service = app.service('images')

service.hooks(hooks)
service.hooks(hooksV1)
}
2 changes: 1 addition & 1 deletion test/integration/use_cases/permissions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
contentItemRedactionPolicyWebApp,
} from '../../../src/services/articles/articles.hooks'
import { trPassageRedactionPolicy } from '../../../src/services/text-reuse-passages/text-reuse-passages.hooks'
import { imageRedactionPolicyWebApp } from '../../../src/services/images/images.hooks'
import { imageRedactionPolicyWebApp } from '../../../src/services/images/images-v1.hooks'
import { DefaultConverters, RedactionPolicy } from '../../../src/util/redaction'
import { JSONPath } from 'jsonpath-plus'
import { SolrNamespaces } from '../../../src/solr'
Expand Down

0 comments on commit b0eb55a

Please sign in to comment.