-
Notifications
You must be signed in to change notification settings - Fork 20
PR Client.ts Saul Lopez #10
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
Open
saullopezc
wants to merge
7
commits into
corecodeio:master
Choose a base branch
from
saullopezc:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+73
−2
Open
Changes from 2 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
dea8e75
Reto completado
saullopezc 264ea25
Dedazo error en " ; " linea 12
saullopezc 500c0a6
Corrigiendo PR
saullopezc 02e5e28
Cambios en password
saullopezc 010e507
commit on master -m "Eliminacion de libreria sin uso"
saullopezc 4fd05a3
Cambio de nomenclatura a camelCase, eliminacion de archivo con contra…
saullopezc 8395df3
Prettier
saullopezc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,5 +2,4 @@ | |
|
|
||
| /node_modules | ||
| /dist | ||
| /data | ||
| src/client.ts | ||
| /data | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,84 +1 @@ | ||
| # Prueba de acceso a core-code.io v20.06.11 | ||
|
|
||
| Welcome to Core Code entry challenge. | ||
|
|
||
| Please follow the instructions and submit them before 2020/06/24. | ||
|
|
||
| ## Instructions | ||
|
|
||
| ### 1. Haz un fork de este repositorio | ||
|
|
||
| Una vez creado el fork, clonarás el proyecto en tu máquina y crearás un file: `./src/client.ts` que haga lo siguiente: | ||
|
|
||
| ### 2. Send a POST request to `http://95.217.235.69/` with the following data: | ||
|
|
||
| ``` | ||
| contactInfo: { | ||
| fullName: "", | ||
| emailAddress: "", | ||
| }, | ||
| github: { | ||
| profileURL: "", | ||
| username: "", | ||
| }, | ||
| credentials: { | ||
| password: "Cambia esta contraseña a una que sólo tú sepas", | ||
| }, | ||
| personalInfo: { | ||
| questions: [ | ||
| { | ||
| question: "If I was a Sr. Programmer, I would like to build:", | ||
| answer: "Respuesta: ...", | ||
| }, | ||
| { | ||
| question: | ||
| "Por favor indica el URL que me lleva a la línea de código de la definición de React.useEffect", | ||
| answer: "Respuesta: ...", | ||
| }, | ||
| { | ||
| question: "code is poetry, because:", | ||
| answer: "Respuesta: ...", | ||
| }, | ||
| ], | ||
| }, | ||
| ``` | ||
|
|
||
| ### 2. Verify that your information was saved successfully | ||
|
|
||
| Send a GET request to the URL `http://95.217.235.69/:emailAddress` with the following headers: | ||
|
|
||
| ``` | ||
| { | ||
| "Content-Type": "application/json", | ||
| "x-password": "tu contraseña especificada en el paso anterior" | ||
| } | ||
| ``` | ||
|
|
||
| The URL param `emailAddress` should be the email address you specified in the previous POST request. | ||
|
|
||
| ### 3. Ya casi | ||
|
|
||
| You should get a response with a valid `claveDeAcceso`. | ||
|
|
||
| ### 4. Crea un pull-request de tu fork al repo original | ||
|
|
||
| Tu branch deberá llamarse: `<github-username>/entry-challenge`, y el pull-request deberá asignarse hacia `master` del repo original. | ||
|
|
||
| ### 5. Envía la contraseña y la solución | ||
|
|
||
| Send an email to `gus@core-code.io`, cc'd to `sc@core-code.io`, with the following information: | ||
|
|
||
| Asunto: `emailAddress@claveDeAcceso` | ||
|
|
||
| El cuerpo del mensaje debe contener un link al pull-request. | ||
|
|
||
| ### 6. Espera los comentarios | ||
|
|
||
| y resuélvelos hasta que tu PR sea aprobado. | ||
|
|
||
| ### 5. Espera la invitación de Github a tu correo registrado (Si no la recibes, es porque no te hemos aceptado) | ||
|
|
||
| Agregaremos tu usuario de Github a la organización de [corecodeio](https://github.com/corecodeio). | ||
| También te agendaremos una reunión de bienvenida para el día 29 de junio. | ||
|
|
||
| ### Estás muy cerca de comenzar tu carrera de Software con Core Code. | ||
| # Reto Completado | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| const axios = require('axios'); | ||
|
areyes107 marked this conversation as resolved.
Outdated
|
||
|
|
||
| const data = { | ||
|
areyes107 marked this conversation as resolved.
Outdated
|
||
| "contactInfo": { | ||
| "fullName": "Saul Lopez", | ||
| "emailAddress": "saullopezc@gmail.com" | ||
| }, | ||
| "github": { | ||
| "profileURL": "https://github.com/saullopezc", | ||
| "username": "saullopezc" | ||
| }, | ||
| "credentials": { | ||
| "password": "YwQuIzgsSTyDURgXq9Ot" | ||
|
areyes107 marked this conversation as resolved.
Outdated
|
||
| }, | ||
| "personalInfo": { | ||
| "questions": [ | ||
| { | ||
| "question": "If I was a Sr. Programmer, I would like to build:", | ||
| "answer": "Paquetes o librerias " | ||
| }, | ||
| { | ||
| "question": "Por favor indica el URL que me lleva a la línea de código de la definición de React.useEffect", | ||
| "answer": "https://es.reactjs.org/docs/hooks-reference.html#useeffect" | ||
| }, | ||
| { | ||
| "question": "code is poetry, because:", | ||
| "answer": "Por la expresion y la belleza del codigo" | ||
| } | ||
| ] | ||
| } | ||
| }; | ||
|
|
||
| export const createProfile = async () => { | ||
| try { | ||
| const res = await axios.post('http://95.217.235.69/', data); | ||
| console.log(`Status: ${res.status}`); | ||
| console.log('Body: ', res.data); | ||
| listProfile(); | ||
| } catch (err) { | ||
| console.error(err); | ||
| } | ||
| }; | ||
|
|
||
| export const listProfile = () => { | ||
|
areyes107 marked this conversation as resolved.
Outdated
|
||
|
|
||
| const URL = "http://95.217.235.69/saullopezc@gmail.com" | ||
| /*var myHeaders = new Headers(); | ||
|
areyes107 marked this conversation as resolved.
Outdated
|
||
| myHeaders.append("Content-Type", "application/json"); | ||
| myHeaders.append("x-password", "YwQuIzgsSTyDURgXq9Ot"); | ||
| console.log(myHeaders);*/ | ||
| axios.get(URL, { | ||
| headers: {"x-password": "YwQuIzgsSTyDURgXq9Ot", "Content-Type": "application/json" }}) | ||
| .then(response => { | ||
| // If request is good... | ||
| console.log(response.data); | ||
|
|
||
| }) | ||
| .catch((error) => { | ||
| console.log('error ' + error); | ||
| }); | ||
|
|
||
| }; | ||
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.