-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ot 63 add slides to public endpoint #88
Ot 63 add slides to public endpoint #88
Conversation
Link a JIRA: https://alkemy-labs.atlassian.net/browse/OT291-63 |
Y ver conflicto del dao |
Removido el console.log y resuelto el conflicto. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
dao/slide.js
Outdated
@@ -19,6 +19,19 @@ class SlidesDap { | |||
throw new Error(error); | |||
} | |||
} | |||
static async findSlidebyOrganization({ where, exclude = [], order = [] }) { | |||
try { | |||
console.log(where) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quitar "console.log"
}); | ||
response === null | ||
? res.status(404).json({ msg: 'Could not find information' }) | ||
: res.status(200).json(response); | ||
: res.status(200).json({ response, slides }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: en vez de response usaría el nombre organization.
}); | ||
return SlideData; | ||
} catch (error) { | ||
throw new Error(error); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Se pueden agregar excepciones custom para estos casos.
Description
AS user
I WANT to see Slides when I enter the page
TO be more informed about them
Criteria of acceptance:
In the public data endpoint of the Organization, the list of Slides ordered by the "order" field must be added.
The Slides will be those belonging to the Organization, based on the organization_id field that should correspond to the Organization that is being returned