@xrengine/server-core
Version:
Shared components for XREngine server
31 lines (25 loc) • 882 B
text/typescript
import { Application } from '../../../declarations'
import appconfig from '../../appconfig'
import config from '../../appconfig'
import logger from '../../ServerLogger'
import { updateAppConfig } from '../../updateAppConfig'
import authentication from '../../user/authentication'
import { Authentication } from './authentication.class'
import hooks from './authentication.hooks'
import createModel from './authentication.model'
declare module '@xrengine/common/declarations' {
interface ServiceTypes {
'authentication-setting': Authentication
}
}
export default (app: Application): void => {
const options = {
Model: createModel(app),
paginate: app.get('paginate'),
multi: true
}
const event = new Authentication(options, app)
app.use('authentication-setting', event)
const service = app.service('authentication-setting')
service.hooks(hooks)
}