changed imports to new ./modules import style

Signed-off-by: Philip Molares <philip.molares@udo.edu>
Signed-off-by: David Mehren <dmehren1@gmail.com>
This commit is contained in:
Philip Molares 2020-04-11 12:26:40 +02:00 committed by David Mehren
parent d278a106e8
commit 22683451bd
No known key found for this signature in database
GPG key ID: 6017AF117F9756CB
4 changed files with 5 additions and 11 deletions

View file

@ -1,6 +1,6 @@
'use strict'
import { Revision } from "./models/revision"
import { Revision } from "./models"
import { sequelize } from './models'
// app

View file

@ -1,6 +1,5 @@
import { AutoIncrement, Table, Column, DataType, PrimaryKey, Model, BelongsTo, createIndexDecorator, ForeignKey } from 'sequelize-typescript'
import { Note } from './note';
import { User } from './user';
import { Note, User } from './index';
const NoteUserIndex = createIndexDecorator({unique: true});
@ -18,7 +17,7 @@ export class Author extends Model<Author> {
@NoteUserIndex
@Column(DataType.UUID)
noteId: string;
@BelongsTo(() => Note, { foreignKey: 'noteId', onDelete: 'CASCADE', constraints: false, hooks: true })
note: Note;

View file

@ -14,9 +14,7 @@ import {
Unique
} from "sequelize-typescript";
import {generate as shortIdGenerate, isValid as shortIdIsValid} from "shortid";
import {Author} from "./author";
import {User} from './user';
import {Revision} from './revision';
import {Author, Revision, User} from "./index";
import {Utils} from "../utils";
import Sequelize from "sequelize";

View file

@ -1,10 +1,7 @@
'use strict'
// realtime
// external modules
import {User} from "./models/user";
import {Author} from "./models/author";
import {Note} from "./models/note";
import {Revision} from "./models/revision";
import { Author, Note, Revision, User } from "./models";
var cookie = require('cookie')
var cookieParser = require('cookie-parser')