Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit 69ceaab

Browse files
#639 - Remove from in the query to get templates
1 parent aa6eb1c commit 69ceaab

File tree

2 files changed

+2
-18
lines changed

2 files changed

+2
-18
lines changed

docs/swagger.yaml

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,11 @@ paths:
2020
get:
2121
summary: "Get all templates"
2222
description: |
23-
"Return all templates. You can specify the date from and name when you would like the records.""
23+
"Return all templates. You can filter by the name"
2424
tags:
2525
- "templates"
2626
operationId: "getTemplates"
2727
parameters:
28-
- name: "from"
29-
in: "query"
30-
description: "The date from when you would like the uploads (inclusive)"
31-
required: false
32-
type: "string"
33-
default: "today's value"
3428
- name: "name"
3529
in: "query"
3630
description: "The name of templates"
@@ -64,13 +58,7 @@ paths:
6458
- "templates"
6559
operationId: "headTemplates"
6660
parameters:
67-
- name: "from"
68-
in: "query"
69-
description: "The date from when you would like the uploads (inclusive)"
70-
required: false
71-
type: "string"
72-
default: "today's value"
73-
- name: "organizationId"
61+
- name: "name"
7462
in: "query"
7563
description: "The name of templates"
7664
required: false

src/services/TemplateService.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,6 @@ uploadEntity.schema = {
6464
*/
6565
async function getEntities (query) {
6666
const filter = {}
67-
if (!query.from) {
68-
query.from = (new Date((new Date()).setDate((new Date()).getDate() - 1)).toISOString()) // 24 hours ago
69-
}
70-
filter.created = { ge: query.from }
7167
if (query.name) {
7268
filter.name = { contains: query.name }
7369
}

0 commit comments

Comments
 (0)