From 56bc4bbafe6811246c05435d7d97352deeaa4ae6 Mon Sep 17 00:00:00 2001 From: "Joao Victor G. Rodrigues" Date: Mon, 14 Oct 2024 11:38:22 -0400 Subject: [PATCH 1/3] remove /api/entities/get_raw_page endpoint (#7348) --- app/api/entities/routes.js | 23 ------------------- .../entities/specs/deprecatedRoutes.spec.js | 14 +++++------ 2 files changed, 6 insertions(+), 31 deletions(-) diff --git a/app/api/entities/routes.js b/app/api/entities/routes.js index a0f1209cab..6748921e87 100644 --- a/app/api/entities/routes.js +++ b/app/api/entities/routes.js @@ -139,29 +139,6 @@ export default app => { .catch(next) ); - app.get( - '/api/entities/get_raw_page', - validation.validateRequest({ - type: 'object', - properties: { - query: { - type: 'object', - properties: { - sharedId: { type: 'string' }, - pageNumber: { type: 'number' }, - }, - required: ['sharedId', 'pageNumber'], - }, - }, - required: ['query'], - }), - (req, res, next) => - entities - .getRawPage(req.query.sharedId, req.language, req.query.pageNumber) - .then(data => res.json({ data })) - .catch(next) - ); - app.get( '/api/entities', parseQuery, diff --git a/app/api/entities/specs/deprecatedRoutes.spec.js b/app/api/entities/specs/deprecatedRoutes.spec.js index 8f862c17d3..3e17ae700b 100644 --- a/app/api/entities/specs/deprecatedRoutes.spec.js +++ b/app/api/entities/specs/deprecatedRoutes.spec.js @@ -318,16 +318,14 @@ describe('entities', () => { }); }); - describe('/api/entities/get_raw_page', () => { - it('should return formattedPlainTextPages page requested', async () => { - jest.spyOn(entities, 'countByTemplate').mockImplementation(async () => Promise.resolve(2)); - const req = { query: { templateId: 'templateId' } }; + it('should return formattedPlainTextPages page requested', async () => { + jest.spyOn(entities, 'countByTemplate').mockImplementation(async () => Promise.resolve(2)); + const req = { query: { templateId: 'templateId' } }; - const response = await routes.get('/api/entities/count_by_template', req); + const response = await routes.get('/api/entities/count_by_template', req); - expect(entities.countByTemplate).toHaveBeenCalledWith('templateId'); - expect(response).toEqual(2); - }); + expect(entities.countByTemplate).toHaveBeenCalledWith('templateId'); + expect(response).toEqual(2); }); describe('/api/entities/count_by_template', () => { From f585fc25e9708a5415f95461bd5ea5573bcf8073 Mon Sep 17 00:00:00 2001 From: Daneryl Date: Mon, 14 Oct 2024 17:38:27 +0200 Subject: [PATCH 2/3] Bump version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 841b45a1cd..4845fb26b7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "uwazi", - "version": "1.188.0", + "version": "1.188.1", "description": "Uwazi is a free, open-source solution for organising, analysing and publishing your documents.", "keywords": [ "react" From 93ee1e7d85505f78003a591996836adf30b2d734 Mon Sep 17 00:00:00 2001 From: Daneryl Date: Mon, 14 Oct 2024 17:38:45 +0200 Subject: [PATCH 3/3] Merge back from production and Bump rc version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d75aa695e9..7f4a54e79b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "uwazi", - "version": "1.189.0-rc1", + "version": "1.189.0-rc2", "description": "Uwazi is a free, open-source solution for organising, analysing and publishing your documents.", "keywords": [ "react"