From 5a832c1f72b7088f10930dbf9924122a2c1b7a84 Mon Sep 17 00:00:00 2001 From: oitsjustjose Date: Sun, 28 Jun 2020 11:40:53 -0500 Subject: [PATCH] Use ShortId in the Url object schema --- src/app/schema.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/app/schema.ts b/src/app/schema.ts index 19b93fa..cc2ba1b 100644 --- a/src/app/schema.ts +++ b/src/app/schema.ts @@ -1,11 +1,13 @@ import mongoose, { Document, Schema, Types } from 'mongoose' const UrlSchema: Schema = new Schema({ + shortid: String, url: String }) export type UrlModel = Document & { _id: Types.ObjectId, + shortid: string, url: string }