Browse Source

make npm run build work

rename functions
pull/1/head
sanke 6 years ago
parent
commit
7dd4f9bf18
  1. 6
      server/src/models/segment_model.ts
  2. 2
      server/src/routes/segments_router.ts

6
server/src/models/segment_model.ts

@ -46,7 +46,7 @@ export class Segment {
} }
export function getLabeled(id: AnalyticUnitId) { export function getLabeledSegments(id: AnalyticUnitId) {
//return db. //return db.
} }
@ -54,9 +54,9 @@ export function getPredicted(id: AnalyticUnitId) {
} }
export async function create(segments: Segment[]) { export async function insertSegments(id: any, segments: Segment[]) {
} }
export function remove(idsToRemove: SegmentId[]) { export function removeSegments(idsToRemove: SegmentId[]) {
} }

2
server/src/routes/segments_router.ts

@ -41,7 +41,7 @@ async function updateSegments(ctx: Router.IRouterContext) {
try { try {
let segmentsUpdate = ctx.request.body; let segmentsUpdate = ctx.request.body;
let id = segmentsUpdate.id; let id = segmentsUpdate.id;
let addedIds = insertSegments(id, segmentsUpdate.addedSegments, true); let addedIds = insertSegments(id, segmentsUpdate.addedSegments);
// removeSegments(id, segmentsUpdate.removedSegments); // removeSegments(id, segmentsUpdate.removedSegments);
ctx.response.body = { addedIds }; ctx.response.body = { addedIds };
runLearning(id); runLearning(id);

Loading…
Cancel
Save