-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
37 additions
and
74 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"$ref": "baseFind.json", | ||
"unevaluatedProperties": false, | ||
"type": "object", | ||
"title": "Collectable Item Find Response", | ||
"description": "Collectable Item find response", | ||
"additionalProperties": false, | ||
"required": ["data"], | ||
"properties": { | ||
"data": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "../schemas/CollectableItemGroup.json" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 12 additions & 12 deletions
24
src/services/collectable-items/collectable-items.service.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,30 @@ | ||
// import { createSwaggerServiceOptions } from 'feathers-swagger'; | ||
import { optionsDisabledInPublicApi } from '../../hooks/public-api'; | ||
// import { docs } from './collectable-items.schema'; | ||
import { createSwaggerServiceOptions } from 'feathers-swagger' | ||
import { optionsDisabledInPublicApi } from '../../hooks/public-api' | ||
import { docs } from './collectable-items.schema' | ||
|
||
// Initializes the `collectable-items` service on path `/collectable-items` | ||
const createService = require('./collectable-items.class.js'); | ||
const hooks = require('./collectable-items.hooks'); | ||
const createService = require('./collectable-items.class.js') | ||
const hooks = require('./collectable-items.hooks') | ||
|
||
module.exports = function (app) { | ||
const paginate = app.get('paginate'); | ||
const paginate = app.get('paginate') | ||
|
||
const options = { | ||
name: 'collectable-items', | ||
paginate, | ||
app, | ||
}; | ||
} | ||
|
||
// Initialize our service with any options it requires | ||
app.use('/collectable-items', createService(options), { | ||
...optionsDisabledInPublicApi(app), | ||
events: [], | ||
// disabled for now while it's not public | ||
// docs: createSwaggerServiceOptions({ schemas: {}, docs }), | ||
}); | ||
docs: createSwaggerServiceOptions({ schemas: {}, docs }), | ||
}) | ||
|
||
// Get our initialized service so that we can register hooks | ||
const service = app.service('collectable-items'); | ||
const service = app.service('collectable-items') | ||
|
||
service.hooks(hooks); | ||
}; | ||
service.hooks(hooks) | ||
} |