Skip to content
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

feat: highlights from admin #3236

Merged
merged 3 commits into from
Jan 20, 2021
Merged

feat: highlights from admin #3236

merged 3 commits into from
Jan 20, 2021

Conversation

UnbearableBear
Copy link
Contributor

waiting for admin pr to be done / merged first

@@ -29,14 +29,14 @@ router.get("/highlights/:slug", async (ctx) => {
if (response.body.hits.total.value === 0) {
ctx.throw(404, `there is no highlights data`);
}
const highlightsData = response.body.hits.hits[0]._source.data;
const highlights = highlightsData.find(
const highlightsCollections = response.body.hits.hits[0]._source.collections;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Je crois que la route highlights retourne tous les champs et ne passe pas par la route items qui oblige à renseigner tous les champs un par un mais regarder si il ne faut pas rajouter la clé collections au mapping quand même.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

les highlight / pre-qualified / glossary sont wrappé dans une propriété data {} qui n'est pas présente dans le mapping.
il y a cette issue #2369 dans laquelle on peut compléter la liste

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

je remplace data par collectionscôté admin justement (qui côté admin est dans document), après je sais pas si c'est une bonne chose mais ça me parle un peu plus

@UnbearableBear UnbearableBear force-pushed the manu/highlights branch 2 times, most recently from 5eea9d6 to 7ac6b9c Compare January 15, 2021 10:15
@UnbearableBear UnbearableBear marked this pull request as ready for review January 15, 2021 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants