diff --git a/server/src/models/segment_model.ts b/server/src/models/segment_model.ts index a2cced2..b65ee88 100644 --- a/server/src/models/segment_model.ts +++ b/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. } @@ -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[]) { } diff --git a/server/src/routes/segments_router.ts b/server/src/routes/segments_router.ts index 15cda5c..80dcc80 100644 --- a/server/src/routes/segments_router.ts +++ b/server/src/routes/segments_router.ts @@ -41,7 +41,7 @@ async function updateSegments(ctx: Router.IRouterContext) { try { let segmentsUpdate = ctx.request.body; let id = segmentsUpdate.id; - let addedIds = insertSegments(id, segmentsUpdate.addedSegments, true); + let addedIds = insertSegments(id, segmentsUpdate.addedSegments); // removeSegments(id, segmentsUpdate.removedSegments); ctx.response.body = { addedIds }; runLearning(id);