Skip to content

Commit

Permalink
Merge branch 'development' into dependabot/npm_and_yarn/storybook/rea…
Browse files Browse the repository at this point in the history
…ct-webpack5-8.3.4
  • Loading branch information
mfacar authored Oct 14, 2024
2 parents 74f1e77 + 93ee1e7 commit 4b3ae52
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 32 deletions.
23 changes: 0 additions & 23 deletions app/api/entities/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
14 changes: 6 additions & 8 deletions app/api/entities/specs/deprecatedRoutes.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "uwazi",
"version": "1.188.0-rc10",
"version": "1.189.0-rc2",
"description": "Uwazi is a free, open-source solution for organising, analysing and publishing your documents.",
"keywords": [
"react"
Expand Down

0 comments on commit 4b3ae52

Please sign in to comment.