| 12345678910111213141516171819202122232425262728 |
- const Objection = require('objection')
- const Schmervice = require('@hapipal/schmervice')
- const Schwifty = require('@hapipal/schwifty')
-
- const MatchQueueService = require('../services/matchqueue')
-
- const MatchQueueModel = require('../models/matchqueue')
- const MatchQueueChooseRoute = require('../routes/matchqueue/choosematch')
-
- module.exports = {
- name: 'matchqueue-plugin',
- version: '1.0.0',
- register: async (server, options) => {
- await server.register(Schwifty)
-
- await server.registerModel(MatchQueueModel)
-
- server.bind({
- transaction: fn => Objection.transaction(server.knex(), fn),
- })
-
- await server.register(Schmervice)
-
- server.registerService(MatchQueueService)
-
- await server.route(MatchQueueChooseRoute)
- },
- }
|