Restrict patching actions to vessel lines only.

These are the only type of lines returned by list().
This commit is contained in:
D. Berge
2020-10-01 18:37:49 +02:00
parent 381e3773c6
commit 902338f835

View File

@@ -4,9 +4,9 @@ async function patch (projectId, line, payload, opts = {}) {
const client = await setSurvey(projectId);
const patchables = {
"remarks": "UPDATE preplot_lines SET remarks = $2 WHERE line = $1;",
"meta": "UPDATE preplot_lines SET meta = $2 WHERE line = $1;",
"ntba": "UPDATE preplot_lines SET ntba = $2 WHERE line = $1;",
"remarks": "UPDATE preplot_lines SET remarks = $2 WHERE line = $1 AND class ='V';",
"meta": "UPDATE preplot_lines SET meta = $2 WHERE line = $1 AND class ='V';",
"ntba": "UPDATE preplot_lines SET ntba = $2 WHERE line = $1 AND class ='V';",
};
try {