Skip to content

Commit

Permalink
Merge pull request #8044 from opengovsg/release-al2
Browse files Browse the repository at this point in the history
build: merge release v6.173.1 to develop
  • Loading branch information
KenLSM authored Jan 13, 2025
2 parents 4863334 + 48f7f5b commit dc40a86
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 30 deletions.
26 changes: 17 additions & 9 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,23 @@ 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).

#### [v6.173.0](https://github.com/opengovsg/FormSG/compare/v6.173.0...v6.173.0)
#### [v6.173.1](https://github.com/opengovsg/FormSG/compare/v6.174.0...v6.173.1)

- fix: remove multer [`#8041`](https://github.com/opengovsg/FormSG/pull/8041)

#### [v6.174.0](https://github.com/opengovsg/FormSG/compare/v6.173.0...v6.174.0)

> 13 January 2025

- fix: only show fixed translations for supported forms [`#8038`](https://github.com/opengovsg/FormSG/pull/8038)
- feat(iframe): add frame messaging for paysg [`#7979`](https://github.com/opengovsg/FormSG/pull/7979)
- chore: mongoose, nanoid packages update [`#8000`](https://github.com/opengovsg/FormSG/pull/8000)
- build: merge release v6.173.0 to develop [`#8034`](https://github.com/opengovsg/FormSG/pull/8034)
- fix(deps): bump libphonenumber-js from 1.11.16 to 1.11.17 in /shared [`#8021`](https://github.com/opengovsg/FormSG/pull/8021)
- * fix(deps): bump fp-ts from 2.16.8 to 2.16.9 (#8017) [`#8027`](https://github.com/opengovsg/FormSG/pull/8027)
- fix: update mongodb binary version to 6 [`#8032`](https://github.com/opengovsg/FormSG/pull/8032)
- chore: bump version to v6.173.0 [`54e544d`](https://github.com/opengovsg/FormSG/commit/54e544d9835af07fbcd2b0218ed522c26b18fa5e)
- chore: bump version to v6.174.0 [`22b1122`](https://github.com/opengovsg/FormSG/commit/22b1122e8e15dbb8ca4c69c1d6c026a865d3b67c)

#### [v6.173.0](https://github.com/opengovsg/FormSG/compare/v6.172.0...v6.173.0)

Expand Down Expand Up @@ -39,7 +53,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- build: release v6.170.0 [`#7998`](https://github.com/opengovsg/FormSG/pull/7998)
- chore: bump version to v6.171.0 [`089a155`](https://github.com/opengovsg/FormSG/commit/089a155a51691f98f7c06ff218da3a263d22086c)

#### [v6.170.0](https://github.com/opengovsg/FormSG/compare/v6.169.1...v6.170.0)
#### [v6.170.0](https://github.com/opengovsg/FormSG/compare/v6.169.0...v6.170.0)

> 16 December 2024

Expand All @@ -51,14 +65,8 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- build: merge release 6.169.0 to develop [`#7987`](https://github.com/opengovsg/FormSG/pull/7987)
- fix(i18n): replace title,desc missed earlier [`#7940`](https://github.com/opengovsg/FormSG/pull/7940)
- feat(i18n): replace hardcoded text in FeedbackBlock for i18n [`#7941`](https://github.com/opengovsg/FormSG/pull/7941)
- chore: bump version to v6.170.0 [`91bdef3`](https://github.com/opengovsg/FormSG/commit/91bdef34cd54b347c6ea9a1526b8811e8a6d2c1c)

#### [v6.169.1](https://github.com/opengovsg/FormSG/compare/v6.169.0...v6.169.1)

> 13 December 2024

- feat: add formurl to otp email [`#7993`](https://github.com/opengovsg/FormSG/pull/7993)
- build: release v6.169.0 [`#7986`](https://github.com/opengovsg/FormSG/pull/7986)
- chore: bump version to v6.170.0 [`91bdef3`](https://github.com/opengovsg/FormSG/commit/91bdef34cd54b347c6ea9a1526b8811e8a6d2c1c)

#### [v6.169.0](https://github.com/opengovsg/FormSG/compare/v6.168.0...v6.169.0)

Expand Down
4 changes: 2 additions & 2 deletions frontend/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 frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "form-frontend",
"version": "6.173.0",
"version": "6.173.1",
"homepage": ".",
"type": "module",
"private": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ const updateFormSettings = async (
// TODO: update this to work with backend
export const updateFormWhitelistSetting: UpdateStorageFormWhitelistSettingFn =
async (formId: string, whitelistCsvString: Promise<string> | null) => {
return ApiService.putForm<FormSettings>(
return ApiService.put<FormSettings>(
`${ADMIN_FORM_ENDPOINT}/${formId}/settings/whitelist`,
{
whitelistCsvString: await whitelistCsvString,
Expand Down
4 changes: 2 additions & 2 deletions 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": "6.173.0",
"version": "6.173.1",
"homepage": "https://form.gov.sg",
"authors": [
"FormSG <[email protected]>"
Expand Down
21 changes: 7 additions & 14 deletions src/app/modules/form/admin-form/admin-form.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { celebrate, Joi as BaseJoi, Segments } from 'celebrate'
import { AuthedSessionData } from 'express-session'
import { StatusCodes } from 'http-status-codes'
import JSONStream from 'JSONStream'
import multer from 'multer'
import { ResultAsync } from 'neverthrow'

import {
Expand Down Expand Up @@ -1657,29 +1656,24 @@ export const handleDeleteWorkflowStep: ControllerHandler<
}

const TWENTY_MB_IN_BYTES = 20 * 1024 * 1024
const handleWhitelistSettingMultipartBody = multer({
limits: {
fieldSize: TWENTY_MB_IN_BYTES,
fields: 1, // only allow csv string field
files: 0,
},
})

const _handleUpdateWhitelistSettingValidator = celebrate({
[Segments.PARAMS]: {
[Segments.PARAMS]: Joi.object({
formId: Joi.string()
.required()
.pattern(/^[a-fA-F0-9]{24}$/)
.message('Your form ID is invalid.'),
},
[Segments.BODY]: {
}),
[Segments.BODY]: Joi.object({
whitelistCsvString: Joi.string()
.allow(null) // for removal of whitelist
.max(TWENTY_MB_IN_BYTES)
.pattern(/^[a-zA-Z0-9,\r\n]+$/)
.messages({
'string.empty': 'Your csv is empty.',
'string.pattern.base': 'Your csv has one or more invalid characters.',
'string.max': 'Your csv is too large.',
}),
},
}),
})

const _parseWhitelistCsvString = (whitelistCsvString: string | null) => {
Expand Down Expand Up @@ -1792,7 +1786,6 @@ export const _handleUpdateWhitelistSettingForTest =
_handleUpdateWhitelistSetting

export const handleUpdateWhitelistSetting = [
handleWhitelistSettingMultipartBody.none(), // expecting string field
_handleUpdateWhitelistSettingValidator,
_handleUpdateWhitelistSetting,
] as ControllerHandler[]
Expand Down

0 comments on commit dc40a86

Please sign in to comment.