@assetval/veritas-prefs
v0.0.3
Published
AssetVal's veritasprefs workspace
Downloads
9
Readme
VeritasPrefs
This is the Veritas VeritasPrefs Schema workspace.
Installation
yarn add @assetval/veritasprefs
Usage
As a Class (Front End)
import { VeritasPrefs } from '@assetval/veritasprefs';
const veritasprefs = new VeritasPrefs();
As Schema (Back End)
import { {VeritasPrefs}Schema, VeritasPrefs } from '@assetval/veritasprefs';
import { Model } from 'mongoose';
export const {VeritasPrefs}Model = model<VeritasPrefs>('{veritasprefs}es', {VeritasPrefs}Schema);
As Validation (Back End)
import { {VeritasPrefs}ValidationSchema } from '@assetval/veritasprefs';
import { z } from 'zod';
import { MagikRoutes } from '../middleware/RouterManager.js';
const ProfileRoute = MagikRoutes.getRouter('/profile');
ProfileRoute.post('/updateVeritasPrefs', {
auth: 'ensureAuthenticated',
validationSchema: z.object({
body: {VeritasPrefs}ValidationSchema
}),
route: async (req, res): Promise<void> => {
// Do something
}
});
License
MIT
Authors
Contributing
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