Skip to content

Commit

Permalink
Merge pull request #2486 from opengovsg/release-v5.21.2
Browse files Browse the repository at this point in the history
chore: merge hotfix release v5.21.2 back to develop
  • Loading branch information
mantariksh authored Jul 30, 2021
2 parents aa3b8c8 + 7c87b10 commit 637f74b
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 19 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,15 @@ All notable changes to this project will be documented in this file. Dates are d

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### [v5.21.2](https://github.com/opengovsg/FormSG/compare/v5.21.1...v5.21.2)

- feat: remove validation when logging esrvcId to login collection [`90a0fb0`](https://github.com/opengovsg/FormSG/commit/90a0fb04c450607c5e246c153583844bfe6d42dc)

#### [v5.21.1](https://github.com/opengovsg/FormSG/compare/v5.21.0...v5.21.1)

> 29 July 2021
- chore: bump version to v5.21.1 [`139cd93`](https://github.com/opengovsg/FormSG/commit/139cd931e96e92ba5c267dbd8a62124ac058acfe)
- fix: allow underscores in form esrvcId validation [`1e7f725`](https://github.com/opengovsg/FormSG/commit/1e7f7250de8621506b916d7b54bde6ab27a225f1)

#### [v5.21.0](https://github.com/opengovsg/FormSG/compare/v5.20.0...v5.21.0)
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "FormSG",
"description": "Form Manager for Government",
"version": "5.21.1",
"version": "5.21.2",
"homepage": "https://form.gov.sg",
"authors": [
"FormSG <[email protected]>"
Expand Down
13 changes: 0 additions & 13 deletions src/app/models/__tests__/login.server.model.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,19 +104,6 @@ describe('login.server.model', () => {
mongoose.Error.ValidationError,
)
})

it('should throw validation error when esrvcId param is invalid format', async () => {
// Act
const actualPromise = LoginModel.create({
...DEFAULT_PARAMS,
esrvcId: 'id with spaces',
})

// Assert
await expect(actualPromise).rejects.toThrowError(
'e-service ID must be alphanumeric, dashes are allowed',
)
})
})

describe('Statics', () => {
Expand Down
4 changes: 0 additions & 4 deletions src/app/models/login.server.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@ const LoginSchema = new Schema<ILoginSchema, ILoginModel>(
esrvcId: {
type: String,
required: true,
validate: [
/^([a-zA-Z0-9-]){1,25}$/i,
'e-service ID must be alphanumeric, dashes are allowed',
],
},
},
{
Expand Down

0 comments on commit 637f74b

Please sign in to comment.