This is the Veritas AddressHistory Schema workspace.
yarn add @assetval/addresshistory
import { AddressHistory } from '@assetval/addresshistory';
const addresshistory = new AddressHistory();
import { {AddressHistory}Schema, AddressHistory } from '@assetval/addresshistory';
import { Model } from 'mongoose';
export const {AddressHistory}Model = model<AddressHistory>('{addresshistory}es', {AddressHistory}Schema);
import { {AddressHistory}ValidationSchema } from '@assetval/addresshistory';
import { z } from 'zod';
import { MagikRoutes } from '../middleware/RouterManager.js';
const ProfileRoute = MagikRoutes.getRouter('/profile');
ProfileRoute.post('/updateAddressHistory', {
auth: 'ensureAuthenticated',
validationSchema: z.object({
body: {AddressHistory}ValidationSchema
}),
route: async (req, res): Promise<void> => {
// Do something
}
});
MIT
Download the Schema repository and make sure you have the following installed:
- asdf
- NodeJS (ASDF)
- PNPM (Corepack / Node / ASDF)
- NX
Then run the following commands:
pnpm install