Skip to content

Commit

Permalink
feat: allow show/edit certification network
Browse files Browse the repository at this point in the history
Co-authored-by: Gudsfile <[email protected]>
  • Loading branch information
VincentHardouin and Gudsfile committed Jun 5, 2024
1 parent a4d0492 commit ed02521
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
5 changes: 3 additions & 2 deletions models/certificationcentersnet.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const {
Model,
} = require('sequelize');

function model(sequelize, DataTypes) {
module.exports = (sequelize, DataTypes) => {
class CertificationCentersNet extends Model {
/**
* Helper method for defining associations.
Expand All @@ -20,7 +20,8 @@ function model(sequelize, DataTypes) {
sequelize,
modelName: 'CertificationCentersNet',
tableName: 'data_certification_centers_net',
updatedAt: false,
createdAt: false,
});
return CertificationCentersNet;
}
module.exports = model;
1 change: 1 addition & 0 deletions src/adminjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const adminOptions = {
rootPath: '/admin',
resources: [
models.CertificationCenter,
models.CertificationCenterNet,
{
resource: models.CertificationCenterNetLink,
options: {
Expand Down
2 changes: 2 additions & 0 deletions src/sequelize.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import { DataTypes, Sequelize } from 'sequelize';
import certificationCenter from '../models/certificationcenter.cjs';
import certificationCenterNet from '../models/certificationcentersnet.cjs';
import certificationCenterNetLink from '../models/certificationcentersnetlink.cjs';
import { config } from './config.js';

const sequelize = new Sequelize(config.databaseUrl);

const models = {
CertificationCenter: certificationCenter(sequelize, DataTypes),
CertificationCenterNet: certificationCenterNet(sequelize, DataTypes),
CertificationCenterNetLink: certificationCenterNetLink(sequelize, DataTypes),
};

Expand Down

0 comments on commit ed02521

Please sign in to comment.