Add profile name field to import

This commit is contained in:
Kevin Thomas
2022-04-17 15:38:17 -07:00
parent 022412473f
commit da40516e10
5 changed files with 14 additions and 6 deletions

View File

@@ -49,7 +49,7 @@ router.post('/profiles', (req, res) => {
function (err) {
if (err) {
logger.error(err)
if (err.code === 'SQLITE_CONSTRAINT') {
if (err.code === 'SQLITE_CONSTRAINT_UNIQUE') {
return res.sendStatus(409)
} else {
return res.sendStatus(500)
@@ -123,7 +123,7 @@ router.post('/profiles/import', (req, res) => {
function (err) {
if (err) {
logger.error(err)
if (err.code === 'SQLITE_CONSTRAINT') {
if (err.code === 'SQLITE_CONSTRAINT_UNIQUE') {
return res.sendStatus(409)
} else {
return res.sendStatus(500)