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 client' | |
| import { User, Mail, Lock } from "lucide-react" | |
| import { useForm, Controller } from "react-hook-form" | |
| import { Button, ButtonBack } from "../../components/Button" | |
| import Field from "../../components/Field" | |
| import { registerSchema } from "./schema" | |
| import { z } from "zod" | |
| type RegisterForm = z.infer<typeof registerSchema> |
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 client' | |
| import { zodResolver } from "@hookform/resolvers/zod" | |
| import { User, Mail, Lock } from "lucide-react" | |
| import { useForm, Controller } from "react-hook-form" | |
| import { Button, ButtonBack } from "../../components/Button" | |
| import Field from "../../components/Field" | |
| import { registerSchema } from "./schema" | |
| import { z } from "zod" |
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 { Icon, Image, Rating } from "../../components/shared" | |
| import { BaseLayout } from "../../layout/BaseLayout" | |
| import {books} from '../../../data/books.json' | |
| import {CartCard} from '@/components/cards/CartCard' |
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 { IBook } from './../service/schema/Books.d'; | |
| import { Request, Response, Router } from 'express'; | |
| import { Book } from '../service/Book'; | |
| export const router = Router(); | |
| import { LIBROS } from "../data/data.json"; | |
| /// OBTENER UNA LISTA DE LIBROS | |
| // filtrar por autor o genero | |
| const modelBook = new Book(LIBROS) |
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 id = 1; | |
| const result = await modelForTest.getById({ id }) |
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
| from django.http import HttpResponse | |
| # Create your views here. | |
| def hello(request): | |
| return HttpResponse('Hola mundo') | |
| def about(request): | |
| return HttpResponse('about') |
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
| export const searchInDb = async <T>(model: Model<T>, query = {}): Promise<T[] | null> => { | |
| try { | |
| const findedEvent = await model.find(query) | |
| return findedEvent | |
| } catch (error) { | |
| throw new Error(error) | |
| } | |
| } | |
| await searchInDb<EventDetail>(EventModel, query) as any |
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 mongoose from "mongoose"; | |
| import { STATUS_PROPOSAL_ENUM } from "../types/const.d.js"; | |
| import muv from 'mongoose-unique-validator' | |
| const talkSchema = mongoose.Schema({ | |
| proponent: { | |
| type: mongoose.Schema.Types.ObjectId, | |
| ref: "User", | |
| required: true | |
| }, |