diff --git a/lib/views/admin/theme.js b/lib/views/admin/theme.js index d7ddc54d..079d0fa5 100644 --- a/lib/views/admin/theme.js +++ b/lib/views/admin/theme.js @@ -42,6 +42,7 @@ function form (req, res) { frontPageText: config.get('frontPageText'), firstLaunch: config.get('firstLaunch'), altHome: config.get('altHome'), + allowPublicSignup: config.get('allowPublicSignup'), currentTheme: currentTheme, themeParameters: themeParameters } @@ -131,8 +132,13 @@ function post (req, res) { theme .setCurrentThemeFromConfig() .then(() => { + const responseContent = { + message: 'Theme updated successfully', + requestBody: req.body + } + if (!req.accepts('text/html')) { - return res.status(200).header('content-type', 'text/plain').send('Theme updated successfully') + return res.status(200).header('content-type', 'application/json').json(responseContent) } else { form(req, res) } diff --git a/lib/views/setup.js b/lib/views/setup.js index de701003..19267db1 100644 --- a/lib/views/setup.js +++ b/lib/views/setup.js @@ -120,8 +120,6 @@ async function setupPost (req, res, settings) { { abortEarly: false } ) - console.log(updatedSettings) - if (updatedSettings.frontendURL && updatedSettings.frontendURL[updatedSettings.frontendURL.length - 1] !== '/') { updatedSettings.frontendURL += '/' } diff --git a/tests/previousresults/get_file_public-:collectionId-:displayId-:version-gff_.xml b/tests/previousresults/get_file_public-:collectionId-:displayId-:version-gff_.xml index 209926df..0f2ad387 100644 --- a/tests/previousresults/get_file_public-:collectionId-:displayId-:version-gff_.xml +++ b/tests/previousresults/get_file_public-:collectionId-:displayId-:version-gff_.xml @@ -1,82 +1,5 @@ - - - part_pIKE_Toggle_1 - 1 - LacI/TetR Toggle Switch - LacI/TetR Toggle Switch - - - - - - - - pIKELeftCassette_1 - 1 - - - - - - - - - - pIKERightCassette_1 - 1 - - - - - - - - - - anno2 - 1 - - - - - - location2 - 1 - - - 1286 - 2834 - - - - - - - - - - anno1 - 1 - - - - - - location1 - 1 - - - 1 - 1285 - - - - - - - BBa_R0040 @@ -125,42 +48,6 @@ - - - ECK120033736 - 1 - ECK120033736 - Terminator2 - - - - - - - - - BBa_C0040 - 1 - tetR - tetR coding sequence - - - - - - - - - BBa_J61130 - 1 - BBa_J61101 RBS - RBS2 - - - - - - part_pIKERightCassette_1 @@ -172,25 +59,25 @@ - - - BBa_J61130 + + + ECK120033736 1 - + - - - ECK120033736 + + + BBa_J61130 1 - + @@ -205,25 +92,25 @@ - - - BBa_E0040 + + + BBa_R0010 1 - + - - - BBa_R0010 + + + BBa_E0040 1 - + @@ -260,116 +147,152 @@ - - - anno6 + + + anno1 1 - - - location6 + + + location1 1 - 1464 - 1554 + 1 + 55 - + - - - anno4 + + + anno5 1 - - - location4 + + + location5 1 - 730 - 742 + 743 + 1463 - + - - - anno5 + + + anno3 1 - - - location5 + + + location3 1 - 743 - 1463 + 69 + 729 - + - - - anno1 + + + anno6 1 - - - location1 + + + location6 1 - 1 - 55 + 1464 + 1554 - + - - - anno3 + + + anno4 1 - - - location3 + + + location4 1 - 69 - 729 + 730 + 742 - + + + + ECK120033736 + 1 + ECK120033736 + Terminator2 + + + + + + + + + BBa_C0040 + 1 + tetR + tetR coding sequence + + + + + + + + + BBa_J61130 + 1 + BBa_J61101 RBS + RBS2 + + + + + + BBa_J61120 @@ -405,91 +328,91 @@ - - - BBa_C0012 + + + BBa_R0040 1 - + - - - ECK120029600 + + + BBa_J61101 1 - + - - - BBa_J61101 + + + BBa_C0012 1 - + - - - BBa_R0040 + + + ECK120029600 1 - + - - - anno4 + + + anno2 1 - - - location4 + + + location2 1 - 1198 - 1288 + 56 + 68 - + - - - anno2 + + + anno1 1 - - - location2 + + + location1 1 - 56 - 68 + 1 + 55 - + @@ -515,25 +438,25 @@ - - - anno1 + + + anno4 1 - - - location1 + + + location4 1 - 1 - 55 + 1198 + 1288 - + @@ -549,6 +472,83 @@ + + + part_pIKE_Toggle_1 + 1 + LacI/TetR Toggle Switch + LacI/TetR Toggle Switch + + + + + + + + pIKERightCassette_1 + 1 + + + + + + + + + + pIKELeftCassette_1 + 1 + + + + + + + + + + anno1 + 1 + + + + + + location1 + 1 + + + 1 + 1285 + + + + + + + + + + anno2 + 1 + + + + + + location2 + 1 + + + 1286 + 2834 + + + + + + + part_BBa_E0040 diff --git a/tests/previousresults/get_file_public-:collectionId-:displayId-:version-omex_.xml b/tests/previousresults/get_file_public-:collectionId-:displayId-:version-omex_.xml index 4aa7a4d5..ec41c515 100644 Binary files a/tests/previousresults/get_file_public-:collectionId-:displayId-:version-omex_.xml and b/tests/previousresults/get_file_public-:collectionId-:displayId-:version-omex_.xml differ diff --git a/tests/previousresults/get_file_public-:collectionId-:displayId-:version-sbol_.xml b/tests/previousresults/get_file_public-:collectionId-:displayId-:version-sbol_.xml index 2e3a41fd..b161bf9b 100644 --- a/tests/previousresults/get_file_public-:collectionId-:displayId-:version-sbol_.xml +++ b/tests/previousresults/get_file_public-:collectionId-:displayId-:version-sbol_.xml @@ -11,24 +11,24 @@ - - - pIKELeftCassette_1 + + + pIKERightCassette_1 1 - + - - - pIKERightCassette_1 + + + pIKELeftCassette_1 1 - + @@ -87,17 +87,6 @@ - - - - ECK120029600 - 1 - - - - - - @@ -131,6 +120,17 @@ + + + + ECK120029600 + 1 + + + + + + @@ -230,6 +230,28 @@ + + + + ECK120033736 + 1 + + + + + + + + + + BBa_R0010 + 1 + + + + + + @@ -274,28 +296,6 @@ - - - - ECK120033736 - 1 - - - - - - - - - - BBa_R0010 - 1 - - - - - - diff --git a/tests/previousresults/get_file_public-:collectionId-:displayId-:version-sbolnr_.xml b/tests/previousresults/get_file_public-:collectionId-:displayId-:version-sbolnr_.xml index fcbedbe9..34190c27 100644 --- a/tests/previousresults/get_file_public-:collectionId-:displayId-:version-sbolnr_.xml +++ b/tests/previousresults/get_file_public-:collectionId-:displayId-:version-sbolnr_.xml @@ -11,24 +11,24 @@ - - - pIKELeftCassette_1 + + + pIKERightCassette_1 1 - + - - - pIKERightCassette_1 + + + pIKELeftCassette_1 1 - + diff --git a/tests/previousresults/get_file_public-:collectionId-:displayId-sbol_.xml b/tests/previousresults/get_file_public-:collectionId-:displayId-sbol_.xml index 2e3a41fd..b161bf9b 100644 --- a/tests/previousresults/get_file_public-:collectionId-:displayId-sbol_.xml +++ b/tests/previousresults/get_file_public-:collectionId-:displayId-sbol_.xml @@ -11,24 +11,24 @@ - - - pIKELeftCassette_1 + + + pIKERightCassette_1 1 - + - - - pIKERightCassette_1 + + + pIKELeftCassette_1 1 - + @@ -87,17 +87,6 @@ - - - - ECK120029600 - 1 - - - - - - @@ -131,6 +120,17 @@ + + + + ECK120029600 + 1 + + + + + + @@ -230,6 +230,28 @@ + + + + ECK120033736 + 1 + + + + + + + + + + BBa_R0010 + 1 + + + + + + @@ -274,28 +296,6 @@ - - - - ECK120033736 - 1 - - - - - - - - - - BBa_R0010 - 1 - - - - - - diff --git a/tests/previousresults/get_file_public-:collectionId-:displayId-sbolnr_.xml b/tests/previousresults/get_file_public-:collectionId-:displayId-sbolnr_.xml index 2e3a41fd..b161bf9b 100644 --- a/tests/previousresults/get_file_public-:collectionId-:displayId-sbolnr_.xml +++ b/tests/previousresults/get_file_public-:collectionId-:displayId-sbolnr_.xml @@ -11,24 +11,24 @@ - - - pIKELeftCassette_1 + + + pIKERightCassette_1 1 - + - - - pIKERightCassette_1 + + + pIKELeftCassette_1 1 - + @@ -87,17 +87,6 @@ - - - - ECK120029600 - 1 - - - - - - @@ -131,6 +120,17 @@ + + + + ECK120029600 + 1 + + + + + + @@ -230,6 +230,28 @@ + + + + ECK120033736 + 1 + + + + + + + + + + BBa_R0010 + 1 + + + + + + @@ -274,28 +296,6 @@ - - - - ECK120033736 - 1 - - - - - - - - - - BBa_R0010 - 1 - - - - - - diff --git a/tests/previousresults/get_file_user-:userId-:collectionId-:displayId-:version-gff_.xml b/tests/previousresults/get_file_user-:userId-:collectionId-:displayId-:version-gff_.xml index f19df8bc..69ad5cc5 100644 --- a/tests/previousresults/get_file_user-:userId-:collectionId-:displayId-:version-gff_.xml +++ b/tests/previousresults/get_file_user-:userId-:collectionId-:displayId-:version-gff_.xml @@ -36,30 +36,6 @@ - - - BBa_J61101 - 1 - BBa_J61101 RBS - RBS1 - - - - - - - - - BBa_C0012 - 1 - lacI - lacI coding sequence - - - - - - part_pIKE_Toggle_1 @@ -148,138 +124,162 @@ - - - ECK120029600 + + + BBa_J61101 1 - + - - - BBa_R0040 + + + BBa_C0012 1 - + - - - BBa_C0012 + + + BBa_R0040 1 - + - - - BBa_J61101 + + + ECK120029600 1 - + - - - anno1 + + + anno4 1 - - - location1 + + + location4 1 - 1 - 55 + 1198 + 1288 - + - - - anno2 + + + anno1 1 - - - location2 + + + location1 1 - 56 - 68 + 1 + 55 - + - - - anno4 + + + anno3 1 - - - location4 + + + location3 1 - 1198 - 1288 + 69 + 1197 - + - - - anno3 + + + anno2 1 - - - location3 + + + location2 1 - 69 - 1197 + 56 + 68 - + + + + BBa_J61101 + 1 + BBa_J61101 RBS + RBS1 + + + + + + + + + BBa_C0012 + 1 + lacI + lacI coding sequence + + + + + + ECK120033736 @@ -339,47 +339,47 @@ - - - BBa_J61120 + + + BBa_C0040 1 - + - - - BBa_R0010 + + + ECK120033736 1 - + - - - ECK120033736 + + + BBa_R0010 1 - + - - - BBa_C0040 + + + BBa_E0040 1 - + @@ -394,146 +394,146 @@ - - - BBa_E0040 + + + BBa_J61120 1 - + - - - anno5 + + + anno3 1 - - - location5 + + + location3 1 - 743 - 1463 + 69 + 729 - + - - - anno4 + + + anno1 1 - - - location4 + + + location1 1 - 730 - 742 + 1 + 55 - + - - - anno2 + + + anno6 1 - - - location2 + + + location6 1 - 56 - 68 + 1464 + 1554 - + - - - anno6 + + + anno2 1 - - - location6 + + + location2 1 - 1464 - 1554 + 56 + 68 - + - - - anno1 + + + anno4 1 - - - location1 + + + location4 1 - 1 - 55 + 730 + 742 - + - - - anno3 + + + anno5 1 - - - location3 + + + location5 1 - 69 - 729 + 743 + 1463 - + diff --git a/tests/previousresults/get_file_user-:userId-:collectionId-:displayId-:version-omex_.xml b/tests/previousresults/get_file_user-:userId-:collectionId-:displayId-:version-omex_.xml index 80c2fe6c..a1637d1f 100644 Binary files a/tests/previousresults/get_file_user-:userId-:collectionId-:displayId-:version-omex_.xml and b/tests/previousresults/get_file_user-:userId-:collectionId-:displayId-:version-omex_.xml differ diff --git a/tests/previousresults/get_file_user-:userId-:collectionId-:displayId-:version-sbol_.xml b/tests/previousresults/get_file_user-:userId-:collectionId-:displayId-:version-sbol_.xml index 5d08e174..bc19750e 100644 --- a/tests/previousresults/get_file_user-:userId-:collectionId-:displayId-:version-sbol_.xml +++ b/tests/previousresults/get_file_user-:userId-:collectionId-:displayId-:version-sbol_.xml @@ -11,24 +11,24 @@ - - - pIKERightCassette_1 + + + pIKELeftCassette_1 1 - + - - - pIKELeftCassette_1 + + + pIKERightCassette_1 1 - + @@ -88,46 +88,46 @@ - - - BBa_J61101 + + + BBa_C0012 1 - + - - - BBa_C0012 + + + BBa_R0040 1 - + - - - ECK120029600 + + + BBa_J61101 1 - + - - - BBa_R0040 + + + ECK120029600 1 - + @@ -231,68 +231,68 @@ - - - BBa_C0040 + + + BBa_E0040 1 - + - - - BBa_J61120 + + + BBa_C0040 1 - + - - - BBa_E0040 + + + BBa_J61130 1 - + - - - BBa_R0010 + + + BBa_J61120 1 - + - - - BBa_J61130 + + + ECK120033736 1 - + - - - ECK120033736 + + + BBa_R0010 1 - + diff --git a/tests/previousresults/get_file_user-:userId-:collectionId-:displayId-:version-sbolnr_.xml b/tests/previousresults/get_file_user-:userId-:collectionId-:displayId-:version-sbolnr_.xml index a8198206..f788de9d 100644 --- a/tests/previousresults/get_file_user-:userId-:collectionId-:displayId-:version-sbolnr_.xml +++ b/tests/previousresults/get_file_user-:userId-:collectionId-:displayId-:version-sbolnr_.xml @@ -11,24 +11,24 @@ - - - pIKERightCassette_1 + + + pIKELeftCassette_1 1 - + - - - pIKELeftCassette_1 + + + pIKERightCassette_1 1 - + diff --git a/tests/previousresults/get_file_user-:userId-:collectionId-:displayId-sbol_.xml b/tests/previousresults/get_file_user-:userId-:collectionId-:displayId-sbol_.xml index 5d08e174..bc19750e 100644 --- a/tests/previousresults/get_file_user-:userId-:collectionId-:displayId-sbol_.xml +++ b/tests/previousresults/get_file_user-:userId-:collectionId-:displayId-sbol_.xml @@ -11,24 +11,24 @@ - - - pIKERightCassette_1 + + + pIKELeftCassette_1 1 - + - - - pIKELeftCassette_1 + + + pIKERightCassette_1 1 - + @@ -88,46 +88,46 @@ - - - BBa_J61101 + + + BBa_C0012 1 - + - - - BBa_C0012 + + + BBa_R0040 1 - + - - - ECK120029600 + + + BBa_J61101 1 - + - - - BBa_R0040 + + + ECK120029600 1 - + @@ -231,68 +231,68 @@ - - - BBa_C0040 + + + BBa_E0040 1 - + - - - BBa_J61120 + + + BBa_C0040 1 - + - - - BBa_E0040 + + + BBa_J61130 1 - + - - - BBa_R0010 + + + BBa_J61120 1 - + - - - BBa_J61130 + + + ECK120033736 1 - + - - - ECK120033736 + + + BBa_R0010 1 - + diff --git a/tests/previousresults/get_file_user-:userId-:collectionId-:displayId-sbolnr_.xml b/tests/previousresults/get_file_user-:userId-:collectionId-:displayId-sbolnr_.xml index 5d08e174..bc19750e 100644 --- a/tests/previousresults/get_file_user-:userId-:collectionId-:displayId-sbolnr_.xml +++ b/tests/previousresults/get_file_user-:userId-:collectionId-:displayId-sbolnr_.xml @@ -11,24 +11,24 @@ - - - pIKERightCassette_1 + + + pIKELeftCassette_1 1 - + - - - pIKELeftCassette_1 + + + pIKERightCassette_1 1 - + @@ -88,46 +88,46 @@ - - - BBa_J61101 + + + BBa_C0012 1 - + - - - BBa_C0012 + + + BBa_R0040 1 - + - - - ECK120029600 + + + BBa_J61101 1 - + - - - BBa_R0040 + + + ECK120029600 1 - + @@ -231,68 +231,68 @@ - - - BBa_C0040 + + + BBa_E0040 1 - + - - - BBa_J61120 + + + BBa_C0040 1 - + - - - BBa_E0040 + + + BBa_J61130 1 - + - - - BBa_R0010 + + + BBa_J61120 1 - + - - - BBa_J61130 + + + ECK120033736 1 - + - - - ECK120033736 + + + BBa_R0010 1 - +