1
0
mirror of https://github.com/sasjs/server.git synced 2026-01-09 07:20:05 +00:00

chore: added client docs + tags

This commit is contained in:
Saad Jutt
2021-11-05 04:37:43 +05:00
parent ae34aa52f0
commit 52c3823f20
10 changed files with 85 additions and 43 deletions

View File

@@ -1,6 +1,19 @@
import mongoose from 'mongoose'
import mongoose, { Schema } from 'mongoose'
const clientSchema = new mongoose.Schema({
export interface ClientPayload {
/**
* Client ID
* @example "someFormattedClientID1234"
*/
clientId: string
/**
* Client Secret
* @example "someRandomCryptoString"
*/
clientSecret: string
}
const ClientSchema = new Schema<ClientPayload>({
clientId: {
type: String,
required: true
@@ -11,4 +24,4 @@ const clientSchema = new mongoose.Schema({
}
})
export default mongoose.model('Client', clientSchema)
export default mongoose.model('Client', ClientSchema)