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
| const imagemin = require('imagemin'); | |
| const imageminJpegtran = require('imagemin-jpegtran'); | |
| const fs = require('fs'); | |
| /* | |
| * Attempts to upload an image provided by a user to the server. | |
| * | |
| * Makes use of imagemin for image compression to reduce impact on server | |
| * drive space. | |
| */ | |
| app.post('/uploadImage', function(req, res) { |
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
| const sql = require('mssql'); | |
| /* | |
| * Recieve a POST request to /users, with a user_id param on the request body. | |
| * | |
| * An SQL lookup will be performed, attempting to find a user in the database | |
| * with the `id` provided in the `user_id` param. | |
| * | |
| * The result of the database query is sent back in the response. | |
| */ | |
| app.post('/users', function(req, res) { |
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
| <?php if ($_SERVER['REQUEST_METHOD'] != 'POST') { | |
| echo' | |
| <div class="row"> | |
| <div class="small-12 columns"> | |
| <form method="post" action=""> | |
| <fieldset class="panel"> | |
| <center> | |
| <h1>Sign In</h1><br> | |
| </center> | |
| <label> |
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
| <script> | |
| /* | |
| * Get a list of all customers from the page. | |
| */ | |
| const customers = document.querySelectorAll('.openCases'); | |
| /* | |
| * Iterate through each DOM element containing the openCases class, | |
| * collecting privileged personal identifier information (PII) | |
| * and store that data in the customerData array. | |
| */ |
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
| { | |
| api_endpoints: { | |
| sign_up: { | |
| url: 'mywebsite.com/auth/sign_up', | |
| method: 'POST', | |
| shape: { | |
| username: { type: String, required: true, min: 6, max: 18 }, | |
| password: { type: String, required: true, min: 6: max 32 }, | |
| referralCode: { type: String, required: true, min: 64, max: 64 } | |
| } |
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
| // ================================================== | |
| // Lista | |
| // ================================================== | |
| altaVenta(req: Request, res: Response) { | |
| var pIdVendedor = req.params.IdPersona; | |
| var pIdCliente = req.body[0]; |
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
| SALIR:BEGIN | |
| /* | |
| Permite .... | |
| */ | |
| DECLARE pPrecioCompra decimal; | |
| DECLARE pStock,pIdSucursal int; | |
| -- Manejo de error en la transacción | |
| DECLARE EXIT HANDLER FOR SQLEXCEPTION | |
| BEGIN | |
| SHOW ERRORS; |
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
| -- chequear permiso | |
| IF NOT EXISTS (SELECT IdPermiso FROM permisos_persona WHERE (IdPermiso = 1 or IdPermiso = 61) AND (IdPersona = pIdUsuario)) THEN | |
| SELECT 'No tienes los permisos suficientes para realizar esta accion' AS Mensaje; | |
| LEAVE SALIR; | |
| END IF; |
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
| function get_rows_gastos_fecha() | |
| { | |
| //before_send(); | |
| table_body.html("<tr><td colspan='<?=sizeof($this->columns)?>' style='font-weight:600;text-align:center'>Espere...</td></tr>"); | |
| var fechaGasto = document.getElementById("fecha-gasto").value; | |
| console.log("table_body row 11 : ",table_body); |
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
| public async webhook(req: Request, res: Response) { | |
| if (req.query.type === 'payment') { | |
| const paymentId = req.query['data.id']; | |
| console.log("paymentId: ",paymentId) | |
| var options = { | |
| 'method': 'GET', | |
| 'hostname': 'api.mercadopago.com', |