student.js 406 B

1234567891011121314151617181920
  1. 'use strict';
  2. const _ = require('lodash');
  3. const { AxiosService } = require('naf-framework-mongoose/lib/service');
  4. const meta = {
  5. create: {
  6. uri: '/enrollments',
  7. method: 'post',
  8. },
  9. };
  10. class StudentService extends AxiosService {
  11. constructor(ctx) {
  12. super(ctx, meta, _.get(ctx.app.config, 'axios.stud'));
  13. this.model = this.ctx.model.Enrollment;
  14. }
  15. }
  16. module.exports = StudentService;