From e99b51895afd532a529744396ecae87d47c68503 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Sun, 21 Jun 2020 14:29:59 +0300 Subject: feat: change hooks and install which-types --- models/polls/poll.schema.ts | 15 --------------- models/users/user.schema.ts | 7 +------ 2 files changed, 1 insertion(+), 21 deletions(-) (limited to 'models') diff --git a/models/polls/poll.schema.ts b/models/polls/poll.schema.ts index 236011f..fd6751c 100644 --- a/models/polls/poll.schema.ts +++ b/models/polls/poll.schema.ts @@ -1,19 +1,4 @@ import { Document, Schema, Types } from 'mongoose'; -import { User } from '../users/user.schema'; - -export interface ImageData { - url: string; - votes: number; -} - -export interface Poll { - _id: string; - author: User; - contents: { - left: ImageData; - right: ImageData; - }; -} export interface ImageDataSchema { url: string; diff --git a/models/users/user.schema.ts b/models/users/user.schema.ts index fd7d1e1..9030d61 100644 --- a/models/users/user.schema.ts +++ b/models/users/user.schema.ts @@ -1,10 +1,5 @@ import { Document, Schema } from 'mongoose'; - -export interface User { - name: string; - avatarUrl?: string; - age?: number; -} +import { User } from 'which-types'; export interface UserSchema extends Document, User { password: string; -- cgit v1.2.3