From e66fcac599e6b6ddc20bb69f06edef6a0be291e6 Mon Sep 17 00:00:00 2001 From: panaaj <38519157+panaaj@users.noreply.github.com> Date: Sun, 2 Jan 2022 14:33:38 +1030 Subject: [PATCH] move `store.ts` to serverstate` folder --- src/api/course/index.ts | 4 +++- src/{api => serverstate}/store.ts | 0 2 files changed, 3 insertions(+), 1 deletion(-) rename src/{api => serverstate}/store.ts (100%) diff --git a/src/api/course/index.ts b/src/api/course/index.ts index 97c01007a..e5fb43ccc 100644 --- a/src/api/course/index.ts +++ b/src/api/course/index.ts @@ -3,7 +3,7 @@ import { Application, Request, Response } from 'express' import path from 'path' import { WithConfig, WithSecurityStrategy, WithSignalK } from '../../app' import _ from 'lodash' -import { Store } from '../store' +import { Store } from '../../serverstate/store' const debug = Debug('signalk:courseApi') @@ -175,6 +175,8 @@ export class CourseApi { this.courseInfo.previousPoint.position = position.value this.emitCourseInfo() res.status(200).send('OK') + } else { + res.status(406).send(`Vessel position unavailable!`) } } catch (err) { res.status(406).send(`Vessel position unavailable!`) diff --git a/src/api/store.ts b/src/serverstate/store.ts similarity index 100% rename from src/api/store.ts rename to src/serverstate/store.ts