Skip to content

Commit

Permalink
Revert "feat(staging): officer verification (#2124)" (#2126)
Browse files Browse the repository at this point in the history
This reverts commit b94ce90.
  • Loading branch information
jia1 committed Jul 28, 2023
1 parent b94ce90 commit cb53472
Show file tree
Hide file tree
Showing 20 changed files with 14 additions and 811 deletions.
2 changes: 0 additions & 2 deletions backend/src/core/models/initialize-models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ import {
GovsgOp,
GovsgTemplate,
GovsgTemplatesAccess,
GovsgVerification,
} from '@govsg/models'
import { UserExperimental } from './user/user-experimental'

Expand Down Expand Up @@ -93,7 +92,6 @@ export const initializeModels = (sequelize: Sequelize): void => {
GovsgTemplate,
GovsgTemplatesAccess,
CampaignGovsgTemplate,
GovsgVerification,
]
const phonebookModels = [ManagedListCampaign]
sequelize.addModels([
Expand Down

This file was deleted.

50 changes: 0 additions & 50 deletions backend/src/govsg/middlewares/govsg-verification.middleware.ts

This file was deleted.

1 change: 0 additions & 1 deletion backend/src/govsg/middlewares/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export * as GovsgMiddleware from './govsg.middleware'
export * as GovsgTemplateMiddleware from './govsg-template.middleware'
export * as GovsgStatsMiddleware from './govsg-stats.middleware'
export * as GovsgVerificationMiddleware from './govsg-verification.middleware'
13 changes: 0 additions & 13 deletions backend/src/govsg/models/govsg-message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,19 @@ import {
Column,
DataType,
ForeignKey,
HasOne,
Model,
Table,
} from 'sequelize-typescript'
import { GovsgVerification } from './govsg-verification'

@Table({ tableName: 'govsg_messages', underscored: true, timestamps: true })
export class GovsgMessage extends Model<GovsgMessage> {
@Column({
type: DataType.BIGINT,
autoIncrement: true,
primaryKey: true,
allowNull: false,
})
id: number

@ForeignKey(() => Campaign)
@Column(DataType.BIGINT)
campaignId: number

@BelongsTo(() => Campaign)
campaign: Campaign

@HasOne(() => GovsgVerification)
govsgVerification: GovsgVerification

@Column(DataType.STRING)
recipient: string

Expand Down
33 changes: 0 additions & 33 deletions backend/src/govsg/models/govsg-verification.ts

This file was deleted.

1 change: 0 additions & 1 deletion backend/src/govsg/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ export * from './govsg-message'
export * from './govsg-message-transactional'
export * from './govsg-template'
export * from './govsg-template-access'
export * from './govsg-verification'
15 changes: 0 additions & 15 deletions backend/src/govsg/routes/govsg-campaign.routes.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { GovsgMessageStatus } from '@core/constants'
import {
CampaignMiddleware,
JobMiddleware,
Expand All @@ -8,7 +7,6 @@ import {
GovsgMiddleware,
GovsgStatsMiddleware,
GovsgTemplateMiddleware,
GovsgVerificationMiddleware,
} from '@govsg/middlewares'
import { Joi, Segments, celebrate } from 'celebrate'
import { Router } from 'express'
Expand Down Expand Up @@ -127,17 +125,4 @@ router.get(
GovsgStatsMiddleware.getDeliveredRecipients
)

router.get(
'/messages',
celebrate({
[Segments.QUERY]: Joi.object({
limit: Joi.number().integer().min(1).max(100).default(10),
offset: Joi.number().integer().min(0).default(0),
status: Joi.string().valid(...Object.values(GovsgMessageStatus)),
}),
}),
CampaignMiddleware.canEditCampaign,
GovsgVerificationMiddleware.listMessages
)

export default router
Loading

0 comments on commit cb53472

Please sign in to comment.