-
Notifications
You must be signed in to change notification settings - Fork 20
solicitud #15
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
base: master
Are you sure you want to change the base?
solicitud #15
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,4 +3,3 @@ | |
| /node_modules | ||
| /dist | ||
| /data | ||
| src/client.ts | ||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,32 @@ | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| import axios from "axios" | ||||||||||||||||||||||||
| import datos from "./datos.json" | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| async function postData() { | ||||||||||||||||||||||||
| axios.post('http://95.217.235.69/',datos) | ||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
ya instalaste |
||||||||||||||||||||||||
| .then(function(response){ | ||||||||||||||||||||||||
| console.log(response); | ||||||||||||||||||||||||
| }).catch(function(error){ | ||||||||||||||||||||||||
| console.log(error); | ||||||||||||||||||||||||
| }) | ||||||||||||||||||||||||
| } | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| function getData() { | ||||||||||||||||||||||||
| axios.get(`http://95.217.235.69/${process.env.EMAIL}`,{ | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. te recomiendo instalar la extensión en el archivo |
||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| headers:{ | ||||||||||||||||||||||||
| "Content-Type": "application/json", | ||||||||||||||||||||||||
| "x-password": process.env.PASSWORD, | ||||||||||||||||||||||||
|
Comment on lines
+17
to
+22
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Para mantenerse consistente, y no causar mal entendidos; como que Sugerencia: podemos utilizar la misma variable importada de |
||||||||||||||||||||||||
| } | ||||||||||||||||||||||||
| }).then(function(response){ | ||||||||||||||||||||||||
| console.log(response); | ||||||||||||||||||||||||
| }).catch(function(error){ | ||||||||||||||||||||||||
| console.log(error); | ||||||||||||||||||||||||
| }) | ||||||||||||||||||||||||
| } | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| postData(); | ||||||||||||||||||||||||
| var s = 0 | ||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. te sugiero que elimines variables innecesarias y que ejecutes la función de
Suggested change
|
||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,28 @@ | ||||||||||
| { | ||||||||||
| "contactInfo": { | ||||||||||
| "fullName": "Jose Eduardo Lopez Gonzalez", | ||||||||||
| "emailAddress": "[email protected]" | ||||||||||
| }, | ||||||||||
| "github": { | ||||||||||
| "profileURL": "https://github.com/jelg14", | ||||||||||
| "username": "jelg14" | ||||||||||
| }, | ||||||||||
| "credentials": { | ||||||||||
| "password": "asdf" | ||||||||||
|
Comment on lines
+10
to
+11
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Ingresar la contraseña directamente desde el código es una mala practica de seguridad. Y veo que al parecer tambien la tienes guardado en Por favor puedes borrar la contraseña del Sugerencia: Para evitar redundancias, mantenerlo modular, y no manipular mucho de los datos dentro del |
||||||||||
| }, | ||||||||||
| "personalInfo": { | ||||||||||
| "questions": [{ | ||||||||||
| "question": "If I was a Sr. Programmer, I would like to build:", | ||||||||||
| "answer": "If I was a S. Programmer, I would like to create a technology that could change the world" | ||||||||||
| }, | ||||||||||
| { | ||||||||||
| "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:https://github.com/facebook/react/blob/655affa302437208e6f03c9ca6d170ea1707ace3/packages/react-reconciler/src/ReactFiberHooks.new.js#L1878" | ||||||||||
| }, | ||||||||||
| { | ||||||||||
| "question": "code is poetry, because:", | ||||||||||
| "answer": "code is poetry because with it you can create anything you can imagine" | ||||||||||
| } | ||||||||||
| ] | ||||||||||
| } | ||||||||||
| } | ||||||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,6 +1,6 @@ | ||||||
| import Ajv from "ajv"; | ||||||
| import { compare, genSalt, hash } from "bcryptjs"; | ||||||
| import express from "express"; | ||||||
| import express, { Request, Response } from "express"; | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. las importaciones de
Suggested change
|
||||||
| import fs from "fs"; | ||||||
| import schema from "./schema.json"; | ||||||
| import server from "./server"; | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,37 +5,34 @@ | |
| "title": "The root schema", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Deja sólo la data necesaria, en este caso tu data. |
||
| "description": "The root schema comprises the entire JSON document.", | ||
| "default": {}, | ||
| "examples": [ | ||
| { | ||
| "contactInfo": { | ||
| "fullName": "Gus", | ||
| "emailAddress": "[email protected]" | ||
| }, | ||
| "github": { | ||
| "profileURL": "", | ||
| "username": "" | ||
| }, | ||
| "credentials": { | ||
| "password": "password" | ||
| }, | ||
| "personalInfo": { | ||
| "questions": [ | ||
| { | ||
| "question": "If I was a Sr. Programmer, I would like to build:", | ||
| "answer": "..." | ||
| }, | ||
| { | ||
| "question": "Por favor indica el URL que me lleva a la línea de código de la definición de React.useEffect", | ||
| "answer": "..." | ||
| }, | ||
| { | ||
| "question": "code is poetry, because:", | ||
| "answer": "" | ||
| } | ||
| ] | ||
| } | ||
| "examples": [{ | ||
| "contactInfo": { | ||
| "fullName": "Gus", | ||
| "emailAddress": "[email protected]" | ||
| }, | ||
| "github": { | ||
| "profileURL": "", | ||
| "username": "" | ||
| }, | ||
| "credentials": { | ||
| "password": "password" | ||
| }, | ||
| "personalInfo": { | ||
| "questions": [{ | ||
| "question": "If I was a Sr. Programmer, I would like to build:", | ||
| "answer": "..." | ||
| }, | ||
| { | ||
| "question": "Por favor indica el URL que me lleva a la línea de código de la definición de React.useEffect", | ||
| "answer": "..." | ||
| }, | ||
| { | ||
| "question": "code is poetry, because:", | ||
| "answer": "" | ||
| } | ||
| ] | ||
| } | ||
| ], | ||
| }], | ||
| "required": [ | ||
| "contactInfo", | ||
| "github", | ||
|
|
@@ -50,12 +47,10 @@ | |
| "title": "The contactInfo schema", | ||
| "description": "An explanation about the purpose of this instance.", | ||
| "default": {}, | ||
| "examples": [ | ||
| { | ||
| "fullName": "Gus", | ||
| "emailAddress": "[email protected]" | ||
| } | ||
| ], | ||
| "examples": [{ | ||
| "fullName": "Gus", | ||
| "emailAddress": "[email protected]" | ||
| }], | ||
| "required": [ | ||
| "fullName", | ||
| "emailAddress" | ||
|
|
@@ -90,12 +85,10 @@ | |
| "title": "The github schema", | ||
| "description": "An explanation about the purpose of this instance.", | ||
| "default": {}, | ||
| "examples": [ | ||
| { | ||
| "profileURL": "", | ||
| "username": "" | ||
| } | ||
| ], | ||
| "examples": [{ | ||
| "profileURL": "", | ||
| "username": "" | ||
| }], | ||
| "required": [ | ||
| "profileURL", | ||
| "username" | ||
|
|
@@ -130,11 +123,9 @@ | |
| "title": "The credentials schema", | ||
| "description": "An explanation about the purpose of this instance.", | ||
| "default": {}, | ||
| "examples": [ | ||
| { | ||
| "password": "password" | ||
| } | ||
| ], | ||
| "examples": [{ | ||
| "password": "password" | ||
| }], | ||
| "required": [ | ||
| "password" | ||
| ], | ||
|
|
@@ -158,24 +149,21 @@ | |
| "title": "The personalInfo schema", | ||
| "description": "An explanation about the purpose of this instance.", | ||
| "default": {}, | ||
| "examples": [ | ||
| { | ||
| "questions": [ | ||
| { | ||
| "question": "If I was a Sr. Programmer, I would like to build:", | ||
| "answer": "..." | ||
| }, | ||
| { | ||
| "question": "Por favor indica el URL que me lleva a la línea de código de la definición de React.useEffect", | ||
| "answer": "..." | ||
| }, | ||
| { | ||
| "question": "code is poetry, because:", | ||
| "answer": "" | ||
| } | ||
| ] | ||
| } | ||
| ], | ||
| "examples": [{ | ||
| "questions": [{ | ||
| "question": "If I was a Sr. Programmer, I would like to build:", | ||
| "answer": "..." | ||
| }, | ||
| { | ||
| "question": "Por favor indica el URL que me lleva a la línea de código de la definición de React.useEffect", | ||
| "answer": "..." | ||
| }, | ||
| { | ||
| "question": "code is poetry, because:", | ||
| "answer": "" | ||
| } | ||
| ] | ||
| }], | ||
| "required": [ | ||
| "questions" | ||
| ], | ||
|
|
@@ -188,8 +176,7 @@ | |
| "description": "An explanation about the purpose of this instance.", | ||
| "default": [], | ||
| "examples": [ | ||
| [ | ||
| { | ||
| [{ | ||
| "question": "If I was a Sr. Programmer, I would like to build:", | ||
| "answer": "..." | ||
| }, | ||
|
|
@@ -201,48 +188,44 @@ | |
| ], | ||
| "additionalItems": true, | ||
| "items": { | ||
| "anyOf": [ | ||
| { | ||
| "$id": "#/properties/personalInfo/properties/questions/items/anyOf/0", | ||
| "type": "object", | ||
| "title": "The first anyOf schema", | ||
| "description": "An explanation about the purpose of this instance.", | ||
| "default": {}, | ||
| "examples": [ | ||
| { | ||
| "question": "If I was a Sr. Programmer, I would like to build:", | ||
| "answer": "..." | ||
| } | ||
| ], | ||
| "required": [ | ||
| "question", | ||
| "answer" | ||
| ], | ||
| "additionalProperties": true, | ||
| "properties": { | ||
| "question": { | ||
| "$id": "#/properties/personalInfo/properties/questions/items/anyOf/0/properties/question", | ||
| "type": "string", | ||
| "title": "The question schema", | ||
| "description": "An explanation about the purpose of this instance.", | ||
| "default": "", | ||
| "examples": [ | ||
| "If I was a Sr. Programmer, I would like to build:" | ||
| ] | ||
| }, | ||
| "answer": { | ||
| "$id": "#/properties/personalInfo/properties/questions/items/anyOf/0/properties/answer", | ||
| "type": "string", | ||
| "title": "The answer schema", | ||
| "description": "An explanation about the purpose of this instance.", | ||
| "default": "", | ||
| "examples": [ | ||
| "..." | ||
| ] | ||
| } | ||
| "anyOf": [{ | ||
| "$id": "#/properties/personalInfo/properties/questions/items/anyOf/0", | ||
| "type": "object", | ||
| "title": "The first anyOf schema", | ||
| "description": "An explanation about the purpose of this instance.", | ||
| "default": {}, | ||
| "examples": [{ | ||
| "question": "If I was a Sr. Programmer, I would like to build:", | ||
| "answer": "..." | ||
| }], | ||
| "required": [ | ||
| "question", | ||
| "answer" | ||
| ], | ||
| "additionalProperties": true, | ||
| "properties": { | ||
| "question": { | ||
| "$id": "#/properties/personalInfo/properties/questions/items/anyOf/0/properties/question", | ||
| "type": "string", | ||
| "title": "The question schema", | ||
| "description": "An explanation about the purpose of this instance.", | ||
| "default": "", | ||
| "examples": [ | ||
| "If I was a Sr. Programmer, I would like to build:" | ||
| ] | ||
| }, | ||
| "answer": { | ||
| "$id": "#/properties/personalInfo/properties/questions/items/anyOf/0/properties/answer", | ||
| "type": "string", | ||
| "title": "The answer schema", | ||
| "description": "An explanation about the purpose of this instance.", | ||
| "default": "", | ||
| "examples": [ | ||
| "..." | ||
| ] | ||
| } | ||
| } | ||
| ], | ||
| }], | ||
| "$id": "#/properties/personalInfo/properties/questions/items" | ||
| } | ||
| } | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
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.
Veo que ya instalaste
prettierpero creo que no se esta aplicando el formato, por los espacios en blanco en tu codigo.Sugerencia: Puedes colocar el siguiente codigo que me funciono en los
setting.jsonde tu editor: