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 View from "@ioc:Adonis/Core/View" | |
| import { | |
| ApiDataPayloadStructure, | |
| OutputTypeStructure, | |
| ViewDataPayloadStructure | |
| } from "App/Interfaces/viewAndApiOutputInterfaces" | |
| function viewAndApiOutputHelper(outputType: OutputTypeStructure, viewDataPayload: ViewDataPayloadStructure, apiDataPayload: ApiDataPayloadStructure) { | |
| if (outputType === 'html') { | |
| return View.render(viewDataPayload.viewTemplate, viewDataPayload.outputData) |
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 payloadGeneratorForViewAndApi(data: object | any[], viewTemplate: string, apiResponseMessage: string) { | |
| const viewDataPayload = { | |
| viewTemplate: viewTemplate, | |
| outputData: { data } | |
| } | |
| const apiDataPayload = { | |
| statusCode: 200, | |
| statusMessage: 'Success', | |
| responseMessage: apiResponseMessage, |
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 Route from '@ioc:Adonis/Core/Route' | |
| import payloadGeneratorForViewAndApi from 'App/Helpers/payloadGeneratorForViewAndApi' | |
| import viewAndApiOutputHelper from 'App/Helpers/viewAndApiOutputHelper' | |
| Route.get('posts', async ({ request }) => { | |
| const posts = [ | |
| { | |
| title: 'Adonis 101', | |
| }, | |
| { |
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
| 'use strict' | |
| const User = use('App/Models/User') | |
| class LoginController { | |
| /** | |
| * INICIAR SESIÓN | |
| * -> formData: Obtener datos introducidos por el usuario (request). | |
| * -> regexEmail: Regex que nos permite validar un email. | |
| * -> user: Obtener el objeto user asociado al uid (email, nombre de usuario, etc.). |
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
| node_modules |
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
| .brz-form__alert.brz-form__alert--success { | |
| -moz-animation: cssAnimation 0s ease-in 7s forwards; | |
| /* Firefox */ | |
| -webkit-animation: cssAnimation 0s ease-in 7s forwards; | |
| /* Safari and Chrome */ | |
| -o-animation: cssAnimation 0s ease-in 5s forwards; | |
| /* Opera */ | |
| animation: cssAnimation 0s ease-in 5s forwards; | |
| -webkit-animation-fill-mode: forwards; | |
| animation-fill-mode: forwards; |
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
| {"v":"5.2.1","fr":30,"ip":0,"op":180,"w":1920,"h":1080,"nm":"Guy and girl working together black","ddd":0,"assets":[{"id":"comp_0","layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Path 6","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[84.912,153.778,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[-13.06,8.63],[-2.4,7.69],[6.12,-0.24],[8.62,-1.69]],"o":[[0,0],[12.77,3.48],[3.86,-2.54],[2.13,-6.81],[-15.98,0.62],[-13.15,7.99]],"v":[[-26.422,-10.175],[-31.102,13.005],[10.788,13.005],[30.648,-3.885],[20.898,-11.685],[-12.532,-17.505]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.721569001675,0.466666996479,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,1 |
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
| {"assets":[],"layers":[{"ddd":0,"ind":0,"ty":4,"nm":"Shape Layer 1","ks":{"o":{"k":100},"r":{"k":0},"p":{"k":[300,300,0]},"a":{"k":[0,0,0]},"s":{"k":[244,244,100]}},"ao":0,"shapes":[{"d":1,"ty":"el","s":{"k":[100,100]},"p":{"k":[0,0]},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse"},{"ty":"tm","s":{"k":[{"i":{"x":[0.439],"y":[1.016]},"o":{"x":[0.561],"y":[0.015]},"n":["0p439_1p016_0p561_0p015"],"t":5,"s":[100],"e":[0]},{"t":33.0000013441176}],"ix":1},"e":{"k":[{"i":{"x":[0.439],"y":[1.017]},"o":{"x":[0.561],"y":[0.016]},"n":["0p439_1p017_0p561_0p016"],"t":0,"s":[100],"e":[0]},{"t":30.0000012219251}],"ix":2},"o":{"k":0,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim"},{"ty":"st","fillEnabled":true,"c":{"k":[1,1,1,1]},"o":{"k":100},"w":{"k":16},"lc":2,"lj":1,"ml":4,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke"}],"ip":0,"op":900.000036657751,"st":0,"bm":0,"sr":1}],"v":"4.5.3","ddd":0,"ip":1.00000004073083,"op":33.0000013441175,"fr":29.9700012207031,"w":600,"h":600} |
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
| {"v":"5.2.1","fr":30,"ip":0,"op":180,"w":1155,"h":700,"nm":"Online Buy Products black","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Path","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[571.86,165.803,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,0.833]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0.167]},"n":["0p833_0p833_0p167_0p167","0p833_0p833_0p167_0p167","0p833_0p833_0p167_0p167"],"t":40,"s":[0,0,100],"e":[100,100,100]},{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,0.833]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0.167]},"n":["0p833_0p833_0p167_0p167","0p833_0p833_0p167_0p167","0p833_0p833_0p167_0p167"],"t":45,"s":[100,100,100],"e":[100,100,100]},{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,0.833]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0.167]},"n":["0p833_0p833_0p167_0p167","0p833_0p833_0p167_0p167","0p833_0p833_0p167_0p167"],"t":50,"s":[100,100,100],"e":[0,0,100]},{"i":{"x":[0 |