Skip to content

Commit

Permalink
fix: fix server build
Browse files Browse the repository at this point in the history
  • Loading branch information
niventc committed Jul 1, 2020
1 parent 44c8071 commit e306908
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 10 deletions.
3 changes: 2 additions & 1 deletion contract/model/data.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Id } from 'model';
import { Id } from './id';


export class Data implements Id {
constructor(
Expand Down
3 changes: 3 additions & 0 deletions contract/model/id.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export interface Id {
_id: string;
}
2 changes: 1 addition & 1 deletion contract/model/image.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Id } from 'model';
import { Id } from './id';

export class Image implements Id {
constructor(
Expand Down
5 changes: 1 addition & 4 deletions contract/model/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
export interface Id {
_id: string;
}

export * from './data';
export * from './id';
export * from './line';
export * from './image';
export * from './note';
Expand Down
3 changes: 2 additions & 1 deletion contract/model/line.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Id } from './id';

export class Line {
export class Line implements Id {
constructor(
public _id: string,
public points: Array<[number, number]>,
Expand Down
2 changes: 1 addition & 1 deletion contract/model/note.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Id } from 'model';
import { Id } from './id';

export class Note implements Id {
constructor(
Expand Down
4 changes: 2 additions & 2 deletions server/src/wall.services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ export class WallService {
public async getWall(name: string): Promise<WallState> {
const wall = await this.wallStore.getWall(name);

const lines = await this.lineStore.getLines(wall.lines);
const lines = await this.lineStore.getItems(wall.lines);
lines.filter(async line => {
if (line.points.length < 2 || !line.colour) {
await this.wallStore.removeLine(name, line._id);
await this.lineStore.deleteLine(line._id);
await this.lineStore.deleteItem(line._id);
return false;
}
return true;
Expand Down

0 comments on commit e306908

Please sign in to comment.