This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cors from 'cors'; | |
import Promise from 'bluebird'; | |
import axios from 'axios'; | |
import database from '../database/database.js'; | |
/** | |
* The goal of this function is to mint custom token that can be used to | |
* authenticate to Firebase. | |
* The function will be called through https, and will check the credentials of | |
* the requested user (through the usage of its Auth0 token). If the Auth0 token |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"wspringer/monkeyman":{"17651":{"size":1275,"stargazers_count":48,"watchers_count":48,"forks_count":15,"open_issues_count":5,"forks":15,"open_issues":5,"watchers":48,"network_count":15,"subscribers_count":9}},"interstar/bootdown":{"17651":{"size":1369,"stargazers_count":7,"watchers_count":7,"forks_count":2,"open_issues_count":0,"forks":2,"open_issues":0,"watchers":7,"network_count":2,"subscribers_count":1}},"adamrenklint/asimov-static":{"17651":{"size":766,"stargazers_count":4,"watchers_count":4,"forks_count":4,"open_issues_count":0,"forks":4,"open_issues":0,"watchers":4,"network_count":4,"subscribers_count":2}},"waferbaby/dimples":{"17651":{"size":561,"stargazers_count":54,"watchers_count":54,"forks_count":7,"open_issues_count":0,"forks":7,"open_issues":0,"watchers":54,"network_count":7,"subscribers_count":3}},"mkdocs/mkdocs":{"17651":{"size":23313,"stargazers_count":5528,"watchers_count":5528,"forks_count":865,"open_issues_count":97,"forks":865,"open_issues":97,"watchers":5528,"network_count":865,"subscrib |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Show only for matching keywords | |
input[value="alexandre" i] ~ #results #result15, | |
input[value="alexandre" i] ~ #results #result16, | |
input[value="alexandre" i] ~ #results #result17 { | |
display: block | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Pre-fill the content | |
#result0:before { content: "Aurora Pleguezelo" } | |
// […] | |
#result15:before { content: "Alexandre Collin" } | |
#result16:before { content: "Alexandre Meunier" } | |
#result17:before { content: "Alexandre Stanislawski" } | |
// […] | |
#result150:before { content: "Zo Asmail" } | |
// Hide them all | |
#results div { display: none } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- one div per employee --> | |
<div id="results"> | |
<div id="result0"></div> | |
<div id="result1"></div> | |
<div id="result2"></div> | |
[…] | |
<div id="result148"></div> | |
<div id="result149"></div> | |
<div id="result150"></div> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<input type="search" value="" | |
oninput="this.setAttribute('value', this.value)" | |
/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input[value="tim" i] ~ #result:before { | |
content: "Tim Carry"; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<input type="search" value="Tim" /> | |
<div id="result"></div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<input type="search" value="Tim" /> | |
<div id="result"></div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Answer | |
Thanks for the question, I'll do my best to guide you the best way I can. | |
I think you're very close to have a working implementation. | |
Algolia secured API keys are API keys with *hard* filters already embedded | |
inside. You generic Search API key will let you search through all the content | |
in your index, but when you create a secured API key, you create a specific | |
version of your search API key that can only search into a subset of records. |
NewerOlder