aboutsummaryrefslogtreecommitdiff
path: root/models/users
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2020-06-10 19:47:48 +0300
committereug-vs <eug-vs@keemail.me>2020-06-10 19:47:48 +0300
commitd40f6e6cf8150f9e112d0b5d8d7075c2fc90264b (patch)
tree7cdb3cb7b86e3333c15bbaefe14fe228cc93d023 /models/users
parent0915870f347eecbf5d1646fa732e2a73418960a6 (diff)
downloadwhich-api-d40f6e6cf8150f9e112d0b5d8d7075c2fc90264b.tar.gz
refactor: improve interfaces and expandAuthor
Diffstat (limited to 'models/users')
-rw-r--r--models/users/user.schema.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/models/users/user.schema.ts b/models/users/user.schema.ts
index 5292add..e39f667 100644
--- a/models/users/user.schema.ts
+++ b/models/users/user.schema.ts
@@ -1,11 +1,13 @@
import { Document, Schema } from "mongoose"
-export interface UserSchema extends Document {
+export interface User {
name: string;
avatarUrl?: string;
age?: number;
}
+export interface UserSchema extends Document, User {}
+
export const userSchema = new Schema({
name: String,
avatarUrl: {