diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index 3e6040545..000000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1 +0,0 @@ -github: ds-wizard diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0ec8589a8..409158d06 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,14 +8,13 @@ on: jobs: btp: name: Build-Tag-Push - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 if: github.repository == 'ds-wizard/engine-backend' strategy: matrix: component: [registry, wizard] - stack: [3.3.1] env: COMPONENT: ${{ matrix.component }} @@ -24,7 +23,7 @@ jobs: DOCKER_META_CONTEXT: './${{ matrix.component }}-server' DOCKER_META_FILE: './${{ matrix.component }}-server/Dockerfile' DOCKER_META_PLATFORMS: 'linux/amd64' - STACK_VERSION: ${{ matrix.stack }} + STACK_VERSION: '3.9.3' PYTHONPATH: ${{ github.workspace }}/lib LD_LIBRARY_PATH: ${{ github.workspace }}/lib ENGINE_JINJA_VERSION: 'v1.0.0' @@ -50,12 +49,17 @@ jobs: run: echo "Force push detected. Cache may be invalidated..." - name: Checkout git repository - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Fetch all git history run: | git fetch --prune --unshallow + - name: Install system dependencies + run: | + sudo apt-get update + sudo apt-get install -y liblzma-dev + - name: Prepare ~/.local/bin run: | mkdir -p ~/.local/bin @@ -63,15 +67,15 @@ jobs: - name: Setup Python if: matrix.component == 'wizard' - uses: actions/setup-python@v4 + uses: actions/setup-python@v6 with: - python-version: '3.10' + python-version: '3.12' - name: Prepare lib directory if: matrix.component == 'wizard' run: | mkdir -p lib - curl -L -o libjinja.tar.gz https://github.com/ds-wizard/engine-jinja/releases/download/$ENGINE_JINJA_VERSION/libjinja-python3.10-ubuntu-22.04-X64.tar.gz + curl -L -o libjinja.tar.gz https://github.com/ds-wizard/engine-jinja/releases/download/$ENGINE_JINJA_VERSION/libjinja-python3.12-ubuntu-24.04-X64.tar.gz tar --strip-components=1 -xzf libjinja.tar.gz -C lib rm libjinja.tar.gz ls -la lib @@ -79,22 +83,22 @@ jobs: # (1) -> Setup cache - name: Cache ~/.stack id: cache-stack - uses: actions/cache@v3 + uses: actions/cache@v5 with: path: ~/.stack - key: stack-home-ubuntu22-${{ hashFiles('**/package.yaml')}}-${{ hashFiles('**/stack.yaml*') }} + key: stack-home-ubuntu24-${{ hashFiles('**/package.yaml')}}-${{ hashFiles('**/stack.yaml*') }} restore-keys: | - stack-home-ubuntu22- + stack-home-ubuntu24- - name: Cache shared-common id: cache-shared-common - uses: actions/cache@v3 + uses: actions/cache@v5 with: path: shared-common/.stack-work - key: shared-common-ubuntu22-${{ hashFiles('shared-common/package.yaml')}}-${{ hashFiles('shared-common/**/*.hs') }} + key: shared-common-ubuntu24-${{ hashFiles('shared-common/package.yaml')}}-${{ hashFiles('shared-common/**/*.hs') }} restore-keys: | - shared-common-ubuntu22-${{ hashFiles('shared-common/package.yaml')}}- - shared-common-ubuntu22- + shared-common-ubuntu24-${{ hashFiles('shared-common/package.yaml')}}- + shared-common-ubuntu24- - name: Invalidate shared-common cache (force push) id: invalidate-cache-shared-common @@ -104,13 +108,13 @@ jobs: - name: Cache wizard-public id: cache-wizard-public - uses: actions/cache@v3 + uses: actions/cache@v5 with: path: wizard-public/.stack-work - key: wizard-public-ubuntu22-${{ hashFiles('wizard-public/package.yaml')}}-${{ hashFiles('wizard-public/**/*.hs') }} + key: wizard-public-ubuntu24-${{ hashFiles('wizard-public/package.yaml')}}-${{ hashFiles('wizard-public/**/*.hs') }} restore-keys: | - wizard-public-ubuntu22-${{ hashFiles('wizard-public/package.yaml')}}- - wizard-public-ubuntu22- + wizard-public-ubuntu24-${{ hashFiles('wizard-public/package.yaml')}}- + wizard-public-ubuntu24- - name: Invalidate wizard-public cache (force push) id: invalidate-cache-wizard-public @@ -120,13 +124,13 @@ jobs: - name: Cache registry-public id: cache-registry-public - uses: actions/cache@v3 + uses: actions/cache@v5 with: path: registry-public/.stack-work - key: registry-public-ubuntu22-${{ hashFiles('registry-public/package.yaml')}}-${{ hashFiles('registry-public/**/*.hs') }} + key: registry-public-ubuntu24-${{ hashFiles('registry-public/package.yaml')}}-${{ hashFiles('registry-public/**/*.hs') }} restore-keys: | - registry-public-ubuntu22-${{ hashFiles('registry-public/package.yaml')}}- - registry-public-ubuntu22- + registry-public-ubuntu24-${{ hashFiles('registry-public/package.yaml')}}- + registry-public-ubuntu24- - name: Invalidate registry-public cache (force push) id: invalidate-cache-registry-public @@ -136,13 +140,13 @@ jobs: - name: Cache registry-server id: cache-registry-server - uses: actions/cache@v3 + uses: actions/cache@v5 with: path: registry-server/.stack-work - key: registry-server-${{ matrix.component }}-ubuntu22-${{ hashFiles('registry-server/package.yaml')}}-${{ hashFiles('registry-server/**/*.hs') }} + key: registry-server-${{ matrix.component }}-ubuntu24-${{ hashFiles('registry-server/package.yaml')}}-${{ hashFiles('registry-server/**/*.hs') }} restore-keys: | - registry-server-${{ matrix.component }}-ubuntu22-${{ hashFiles('registry-server/package.yaml')}}- - registry-server-${{ matrix.component }}-ubuntu22- + registry-server-${{ matrix.component }}-ubuntu24-${{ hashFiles('registry-server/package.yaml')}}- + registry-server-${{ matrix.component }}-ubuntu24- - name: Invalidate registry-server cache (force push) id: invalidate-cache-registry-server @@ -152,14 +156,14 @@ jobs: - name: Cache wizard-server id: cache-wizard-server - uses: actions/cache@v3 + uses: actions/cache@v5 if: matrix.component == 'wizard' with: path: wizard-server/.stack-work - key: wizard-server-${{ matrix.component }}-ubuntu22-${{ hashFiles('wizard-server/package.yaml')}}-${{ hashFiles('wizard-server/**/*.hs') }} + key: wizard-server-${{ matrix.component }}-ubuntu24-${{ hashFiles('wizard-server/package.yaml')}}-${{ hashFiles('wizard-server/**/*.hs') }} restore-keys: | - wizard-server-${{ matrix.component }}-ubuntu22-${{ hashFiles('wizard-server/package.yaml')}}- - wizard-server-${{ matrix.component }}-ubuntu22- + wizard-server-${{ matrix.component }}-ubuntu24-${{ hashFiles('wizard-server/package.yaml')}}- + wizard-server-${{ matrix.component }}-ubuntu24- - name: Invalidate wizard-server cache (force push) id: invalidate-cache-wizard-server @@ -169,10 +173,10 @@ jobs: - name: Cache Stack in ~/.local/bin id: cache-stack-local-bin - uses: actions/cache@v3 + uses: actions/cache@v5 with: path: ~/.local/bin - key: stack-local-bin-ubuntu22-${{ matrix.stack }} + key: stack-local-bin-ubuntu24-${{ matrix.stack }} # (2) -> Prepare and install dependencies - name: Setup stack @@ -217,7 +221,7 @@ jobs: # (4.1) -> Docker build (test) - name: Docker meta [test] id: meta-test - uses: docker/metadata-action@v5 + uses: docker/metadata-action@v6 with: images: | ${{ env.PUBLIC_IMAGE_PREFIX }}/${{ env.IMAGE_NAME }} @@ -225,7 +229,7 @@ jobs: type=sha - name: Docker build [test] - uses: docker/build-push-action@v5 + uses: docker/build-push-action@v7 with: context: ${{ env.DOCKER_META_CONTEXT }} file: ${{ env.DOCKER_META_FILE }} @@ -237,7 +241,7 @@ jobs: # (4.2) -> Docker login - name: Docker login [docker.io] if: github.event_name != 'pull_request' - uses: docker/login-action@v3 + uses: docker/login-action@v4 with: username: ${{ secrets.DOCKER_HUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_PASSWORD }} @@ -246,7 +250,7 @@ jobs: - name: Docker meta [dev] id: meta-dev if: github.event_name != 'pull_request' - uses: docker/metadata-action@v5 + uses: docker/metadata-action@v6 with: images: | ${{ secrets.DOCKER_HUB_USERNAME }}/${{ env.IMAGE_NAME }} @@ -254,7 +258,7 @@ jobs: type=ref,event=branch - name: Docker build+push [dev] - uses: docker/build-push-action@v5 + uses: docker/build-push-action@v7 if: github.event_name != 'pull_request' && steps.meta-dev.outputs.tags != '' with: context: ${{ env.DOCKER_META_CONTEXT }} @@ -268,7 +272,7 @@ jobs: - name: Docker meta [public] id: meta-public if: github.event_name != 'pull_request' - uses: docker/metadata-action@v5 + uses: docker/metadata-action@v6 with: images: | ${{ env.PUBLIC_IMAGE_PREFIX }}/${{ env.IMAGE_NAME }} @@ -280,7 +284,7 @@ jobs: type=semver,pattern={{major}},enable=${{ !startsWith(github.ref, 'refs/tags/v0.') }} - name: Docker build+push [public] - uses: docker/build-push-action@v5 + uses: docker/build-push-action@v7 if: github.event_name != 'pull_request' && steps.meta-public.outputs.tags != '' with: context: ${{ env.DOCKER_META_CONTEXT }} diff --git a/.github/workflows/code-style.yml b/.github/workflows/code-style.yml index cb6c1e7ae..054db9a80 100644 --- a/.github/workflows/code-style.yml +++ b/.github/workflows/code-style.yml @@ -5,15 +5,15 @@ on: jobs: hlint: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 env: - HLINT_VERSION: '3.5' + HLINT_VERSION: '3.10' steps: # (1) -> Init - name: Checkout git repository - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Prepare ~/.local/bin run: | @@ -23,7 +23,7 @@ jobs: # (2) -> Setup cache - name: Cache ~/.local/bin id: cache-local-bin - uses: actions/cache@v3 + uses: actions/cache@v5 with: path: ~/.local/bin key: local-bin-${{ env.HLINT_VERSION }} @@ -39,23 +39,24 @@ jobs: # (4) -> Run hlint - name: Run hlint run: | - hlint shared-common - hlint registry-public - hlint registry-server - hlint wizard-public - hlint wizard-server + hlint \ + shared-common \ + registry-public \ + registry-server \ + wizard-public \ + wizard-server fourmolu: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 env: - FOURMOLU_VERSION: '0.8.2.0' - HPACK_VERSION: '0.34.2' + FOURMOLU_VERSION: '0.19.0.1' + HPACK_VERSION: '0.38.3' steps: # (1) -> Init - name: Checkout git repository - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Prepare ~/.local/bin run: | @@ -65,7 +66,7 @@ jobs: # (2) -> Setup cache - name: Cache ~/.local/bin id: cache-local-bin - uses: actions/cache@v3 + uses: actions/cache@v5 with: path: ~/.local/bin key: local-bin-${{ env.FOURMOLU_VERSION }}-${{ env.HPACK_VERSION }} @@ -131,16 +132,16 @@ jobs: # CSpell cspell: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Check out repository - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Set up Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@v6 with: - node-version: '22' + node-version: '24' - name: Install CSpell run: | diff --git a/README.md b/README.md index 44efac26a..bddd8d249 100644 --- a/README.md +++ b/README.md @@ -20,8 +20,8 @@ For contributing guidelines, please read [CONTRIBUTING](CONTRIBUTING.md) and [re - **Stack** (recommended 2.15.3 or higher) - **Postgres & libpq** (recommended 15.5) - - **Fourmolu** (recommended 0.8.2.0, optional) - - **HLint** (recommended 3.4.1, optional) + - **Fourmolu** (recommended 0.19.0.1, optional) + - **HLint** (recommended 3.10, optional) - **Docker** (recommended 19.03.0-ce) - *for build of production image* - [**document-worker**](https://github.com/ds-wizard/engine-tools) (corresponding version) - [**mailer**](https://github.com/ds-wizard/engine-tools) (corresponding version) @@ -65,8 +65,7 @@ $ stack test Create a bash script which will do the work for you. Run the script from the root of the project ```bash -$ fourmolu -i (find /src -name '*.hs') -$ fourmolu -i (find /test -name '*.hs') +$ fourmolu -i $(find . -name '*.hs') ``` ### Code coverage diff --git a/fourmolu.yaml b/fourmolu.yaml index b82ee8efc..c770235bd 100644 --- a/fourmolu.yaml +++ b/fourmolu.yaml @@ -12,4 +12,5 @@ record-brace-space: true #in-style: right-align #unicode: never #respectful: false -#fixities: [] \ No newline at end of file +#fixities: [] +single-constraint-parens: never diff --git a/registry-public/package.yaml b/registry-public/package.yaml index 4ebd6484d..5042dfee1 100644 --- a/registry-public/package.yaml +++ b/registry-public/package.yaml @@ -1,5 +1,5 @@ name: registry-public -version: '4.29.0' +version: '4.30.0' synopsis: Registry Public description: Registry Public category: Web diff --git a/registry-server/Dockerfile b/registry-server/Dockerfile index 410c95b35..d91d62799 100644 --- a/registry-server/Dockerfile +++ b/registry-server/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:22.04 +FROM ubuntu:24.04 WORKDIR /app diff --git a/registry-server/package.yaml b/registry-server/package.yaml index 5243ab366..97ceb8e27 100644 --- a/registry-server/package.yaml +++ b/registry-server/package.yaml @@ -1,5 +1,5 @@ name: registry-server -version: '4.29.0' +version: '4.30.0' synopsis: Engine Registry description: Engine Registry category: Web diff --git a/registry-server/src/Registry/Api/Handler/Swagger/Api.hs b/registry-server/src/Registry/Api/Handler/Swagger/Api.hs index edaba011d..dd51c2afa 100644 --- a/registry-server/src/Registry/Api/Handler/Swagger/Api.hs +++ b/registry-server/src/Registry/Api/Handler/Swagger/Api.hs @@ -41,7 +41,7 @@ swagger = s._swaggerInfo { _infoTitle = "Registry API" , _infoDescription = Just "API specification for Registry" - , _infoVersion = "4.29.0" + , _infoVersion = "4.30.0" , _infoLicense = Just $ License diff --git a/shared-common/package.yaml b/shared-common/package.yaml index f0f248d0b..e2bc1e939 100644 --- a/shared-common/package.yaml +++ b/shared-common/package.yaml @@ -1,5 +1,5 @@ name: shared-common -version: '4.29.0' +version: '4.30.0' synopsis: Engine Shared description: Engine Shared category: Web diff --git a/shared-common/src/Shared/Common/Api/Resource/Version/VersionSM.hs b/shared-common/src/Shared/Common/Api/Resource/Version/VersionSM.hs index a24dcdbe1..17ace0d01 100644 --- a/shared-common/src/Shared/Common/Api/Resource/Version/VersionSM.hs +++ b/shared-common/src/Shared/Common/Api/Resource/Version/VersionSM.hs @@ -11,5 +11,4 @@ import Shared.Common.Util.Uuid instance ToSchema VersionDTO where declareNamedSchema = toSwagger - ( toVersionDTO (u' "ac3a6934-2069-4792-943c-e1170edee8c2", "1.0.0") - ) + (toVersionDTO (u' "ac3a6934-2069-4792-943c-e1170edee8c2", "1.0.0")) diff --git a/shared-common/src/Shared/Common/Service/Config/Server/ServerConfigValidation.hs b/shared-common/src/Shared/Common/Service/Config/Server/ServerConfigValidation.hs index fabcadf36..1e1cc9aba 100644 --- a/shared-common/src/Shared/Common/Service/Config/Server/ServerConfigValidation.hs +++ b/shared-common/src/Shared/Common/Service/Config/Server/ServerConfigValidation.hs @@ -19,7 +19,7 @@ validateGeneralSecret config | secretLen /= 32 = Left . GeneralServerError $ _ERROR_SERVICE_CONFIG__VALIDATION_SECRET | otherwise = Right config where - secretLen = length $ config.general.secret + secretLen = length config.general.secret validateGeneralRsaPrivateKey :: (HasField "general" serverConfig serverConfigGeneral, HasField "rsaPrivateKey" serverConfigGeneral RSA.PrivateKey) => serverConfig -> Either AppError serverConfig validateGeneralRsaPrivateKey config = diff --git a/shared-common/src/Shared/Common/Service/File/FileService.hs b/shared-common/src/Shared/Common/Service/File/FileService.hs index ac182ab06..01e7a0bc1 100644 --- a/shared-common/src/Shared/Common/Service/File/FileService.hs +++ b/shared-common/src/Shared/Common/Service/File/FileService.hs @@ -18,7 +18,7 @@ listFilesWithExtension folder extension = do files <- fileList folder return $ filter (isSuffixOf ("." ++ extension)) files -loadJSONFile :: (FromJSON a) => FilePath -> IO (Either AppError a) +loadJSONFile :: FromJSON a => FilePath -> IO (Either AppError a) loadJSONFile path = do content <- B.readFile path case eitherDecode content of diff --git a/shared-common/src/Shared/Common/Util/List.hs b/shared-common/src/Shared/Common/Util/List.hs index 9533b8cf6..969779b2a 100644 --- a/shared-common/src/Shared/Common/Util/List.hs +++ b/shared-common/src/Shared/Common/Util/List.hs @@ -95,7 +95,7 @@ foldInContext = Prelude.foldl foldOne (return []) entity <- entityIO return $ list ++ [entity] -replace :: (Eq a) => a -> a -> [a] -> [a] +replace :: Eq a => a -> a -> [a] -> [a] replace new old = L.map replace' where replace' elem = if elem == old then new else elem diff --git a/shared-common/src/Shared/Common/Util/Logger.hs b/shared-common/src/Shared/Common/Util/Logger.hs index 5075d563a..a5e0d8fb6 100644 --- a/shared-common/src/Shared/Common/Util/Logger.hs +++ b/shared-common/src/Shared/Common/Util/Logger.hs @@ -160,7 +160,7 @@ sendToSentry sendToSentry component message = do context <- ask when - (context.serverConfig'.sentry'.enabled) + context.serverConfig'.sentry'.enabled ( do let sentryDsn = context.serverConfig'.sentry'.dsn sentryService <- liftIO $ initRaven sentryDsn id sendRecord stderrFallback diff --git a/shared-common/src/Shared/DocumentTemplate/Service/DocumentTemplate/DocumentTemplateUtil.hs b/shared-common/src/Shared/DocumentTemplate/Service/DocumentTemplate/DocumentTemplateUtil.hs index 455b0afde..2a877cc98 100644 --- a/shared-common/src/Shared/DocumentTemplate/Service/DocumentTemplate/DocumentTemplateUtil.hs +++ b/shared-common/src/Shared/DocumentTemplate/Service/DocumentTemplate/DocumentTemplateUtil.hs @@ -31,10 +31,10 @@ changeDocumentTemplateIdInFormats documentTemplateUuid tenantUuid = { documentTemplateUuid = documentTemplateUuid , tenantUuid = tenantUuid } - :: DocumentTemplateFormatStep + :: DocumentTemplateFormatStep ) (steps f) , tenantUuid = tenantUuid } - :: DocumentTemplateFormat + :: DocumentTemplateFormat ) diff --git a/shared-common/src/Shared/KnowledgeModel/Database/Migration/Development/KnowledgeModel/Data/AnswersAndFollowUpQuestions.hs b/shared-common/src/Shared/KnowledgeModel/Database/Migration/Development/KnowledgeModel/Data/AnswersAndFollowUpQuestions.hs index 8c6c9b937..368b8c9d7 100644 --- a/shared-common/src/Shared/KnowledgeModel/Database/Migration/Development/KnowledgeModel/Data/AnswersAndFollowUpQuestions.hs +++ b/shared-common/src/Shared/KnowledgeModel/Database/Migration/Development/KnowledgeModel/Data/AnswersAndFollowUpQuestions.hs @@ -171,7 +171,7 @@ q2_aYes_fuQuestion1 = { uuid = u' "f9b380eb-bc18-4445-a9bf-14d9a1512d3f" , title = "First Follow-Up Question" , text = Just "Maybe there will be some description" - , requiredPhaseUuid = Just $ PHS.phase2.uuid + , requiredPhaseUuid = Just PHS.phase2.uuid , annotations = [] , tagUuids = [FT.tagDataScience.uuid] , referenceUuids = [] @@ -188,7 +188,7 @@ q2_aYes_fuQuestion1Plain = { uuid = q2_aYes_fuQuestion1.uuid , title = "Fourth Question" , text = Just "Just follow" - , requiredPhaseUuid = Just $ PHS.phase2.uuid + , requiredPhaseUuid = Just PHS.phase2.uuid , annotations = [] , tagUuids = [] , referenceUuids = [] @@ -206,7 +206,7 @@ q2_aYes_fuq1_aYes_fuQuestion2 = { uuid = u' "00000000-27bd-4156-9b2d-c4e8c582cca8" , title = "Second Follow-Up Question" , text = Just "Again just follow" - , requiredPhaseUuid = Just $ PHS.phase2.uuid + , requiredPhaseUuid = Just PHS.phase2.uuid , annotations = [] , tagUuids = [] , referenceUuids = [] @@ -223,7 +223,7 @@ q2_aYes_fuq1_aYes_fuQuestion2Edited = { uuid = q2_aYes_fuq1_aYes_fuQuestion2.uuid , title = "EDITED: Second Follow-Up Question" , text = Just "EDITED: Again just follow" - , requiredPhaseUuid = Just $ PHS.phase1.uuid + , requiredPhaseUuid = Just PHS.phase1.uuid , annotations = [] , tagUuids = [] , referenceUuids = [] @@ -241,7 +241,7 @@ q2_aYes1_fuq1_aYes3_fuq2_aYes4_fuQuestion3 = { uuid = u' "00000000-bd35-4d5e-8995-78a94a69da83" , title = "Third Follow-Up Question" , text = Just "Again and again just follow" - , requiredPhaseUuid = Just $ PHS.phase2.uuid + , requiredPhaseUuid = Just PHS.phase2.uuid , annotations = [] , tagUuids = [] , referenceUuids = [] @@ -259,7 +259,7 @@ q4_it1_q6_aYes_followUpQuestion4 = { uuid = u' "cd98f76a-a430-4bd6-ba63-eb4c3c5c8c7e" , title = "Fourth Follow-Up Question" , text = Just "Again and again just follow" - , requiredPhaseUuid = Just $ PHS.phase2.uuid + , requiredPhaseUuid = Just PHS.phase2.uuid , annotations = [] , tagUuids = [] , referenceUuids = [] @@ -277,7 +277,7 @@ q4_it1_q6_aYes_followUpQuestion4Edited = { uuid = q4_it1_q6_aYes_followUpQuestion4.uuid , title = "EDITED: Third Follow-Up Question" , text = Just "EDITED: Again and again just follow" - , requiredPhaseUuid = Just $ PHS.phase1.uuid + , requiredPhaseUuid = Just PHS.phase1.uuid , annotations = [] , tagUuids = [] , referenceUuids = [] @@ -295,7 +295,7 @@ q4_it1_q6_aYes_fuq4_it_question1 = { uuid = u' "e5a3e1b2-077a-405f-b35c-3bffded63140" , title = "Sub question 1 of Follow-Up Question 4" , text = Just "Again and again just follow" - , requiredPhaseUuid = Just $ PHS.phase2.uuid + , requiredPhaseUuid = Just PHS.phase2.uuid , annotations = [] , tagUuids = [] , referenceUuids = [] @@ -312,7 +312,7 @@ q4_it1_q6_aYes_fuq4_it_question2 = { uuid = u' "7f2e3fe5-b8b6-4b5a-812d-c5c1c704b3d9" , title = "Sub question 2 of Follow-Up Question 4" , text = Just "Again and again just follow" - , requiredPhaseUuid = Just $ PHS.phase2.uuid + , requiredPhaseUuid = Just PHS.phase2.uuid , annotations = [] , tagUuids = [] , referenceUuids = [] @@ -329,7 +329,7 @@ q4_it1_q6_aYes_followUpQuestion5 = { uuid = u' "82f9a83a-88c8-439b-8cf8-8a028d5cce7d" , title = "Fifth Follow-Up Question" , text = Just "Some non-funny description" - , requiredPhaseUuid = Just $ PHS.phase2.uuid + , requiredPhaseUuid = Just PHS.phase2.uuid , annotations = [] , tagUuids = [] , referenceUuids = [] diff --git a/shared-common/src/Shared/KnowledgeModel/Database/Migration/Development/KnowledgeModel/Data/Event/KnowledgeModelEvents.hs b/shared-common/src/Shared/KnowledgeModel/Database/Migration/Development/KnowledgeModel/Data/Event/KnowledgeModelEvents.hs index 016470e4a..94d700cae 100644 --- a/shared-common/src/Shared/KnowledgeModel/Database/Migration/Development/KnowledgeModel/Data/Event/KnowledgeModelEvents.hs +++ b/shared-common/src/Shared/KnowledgeModel/Database/Migration/Development/KnowledgeModel/Data/Event/KnowledgeModelEvents.hs @@ -60,13 +60,13 @@ e_km1 = e_km1__content :: EditKnowledgeModelEvent e_km1__content = EditKnowledgeModelEvent - { annotations = ChangedValue $ km1Edited.annotations - , chapterUuids = ChangedValue $ km1Edited.chapterUuids - , tagUuids = ChangedValue $ km1Edited.tagUuids - , integrationUuids = ChangedValue $ km1Edited.integrationUuids - , metricUuids = ChangedValue $ km1Edited.metricUuids - , phaseUuids = ChangedValue $ km1Edited.phaseUuids - , resourceCollectionUuids = ChangedValue $ km1Edited.resourceCollectionUuids + { annotations = ChangedValue km1Edited.annotations + , chapterUuids = ChangedValue km1Edited.chapterUuids + , tagUuids = ChangedValue km1Edited.tagUuids + , integrationUuids = ChangedValue km1Edited.integrationUuids + , metricUuids = ChangedValue km1Edited.metricUuids + , phaseUuids = ChangedValue km1Edited.phaseUuids + , resourceCollectionUuids = ChangedValue km1Edited.resourceCollectionUuids } -- ---------------------------------------------------------------------------- @@ -148,10 +148,10 @@ e_km1_ch1 = e_km1_ch1__content :: EditChapterEvent e_km1_ch1__content = EditChapterEvent - { title = ChangedValue $ chapter1Edited.title - , text = ChangedValue $ chapter1Edited.text - , annotations = ChangedValue $ chapter1Edited.annotations - , questionUuids = ChangedValue $ chapter1Edited.questionUuids + { title = ChangedValue chapter1Edited.title + , text = ChangedValue chapter1Edited.text + , annotations = ChangedValue chapter1Edited.annotations + , questionUuids = ChangedValue chapter1Edited.questionUuids } e_km1_ch1_2 :: KnowledgeModelEvent @@ -164,9 +164,9 @@ e_km1_ch1_2 = EditChapterEvent' $ EditChapterEvent { title = ChangedValue $ "TWICE: " ++ chapter1Edited.title - , text = ChangedValue $ chapter1Edited.text - , annotations = ChangedValue $ chapter1Edited.annotations - , questionUuids = ChangedValue $ chapter1Edited.questionUuids + , text = ChangedValue chapter1Edited.text + , annotations = ChangedValue chapter1Edited.annotations + , questionUuids = ChangedValue chapter1Edited.questionUuids } , createdAt = dt'' 2018 1 21 0 } @@ -462,7 +462,7 @@ e_km1_ch1_q1_type = , tagUuids = NothingChanged , expertUuids = NothingChanged , referenceUuids = NothingChanged - , answerUuids = ChangedValue $ question1WithNewType.answerUuids + , answerUuids = ChangedValue question1WithNewType.answerUuids } , createdAt = dt'' 2018 1 21 0 } @@ -480,14 +480,14 @@ e_km1_ch1_q2 = e_km1_ch1_q2__content :: EditOptionsQuestionEvent e_km1_ch1_q2__content = EditOptionsQuestionEvent - { title = ChangedValue $ question2Edited.title - , text = ChangedValue $ question2Edited.text - , requiredPhaseUuid = ChangedValue $ question2Edited.requiredPhaseUuid - , annotations = ChangedValue $ question2Edited.annotations - , tagUuids = ChangedValue $ question2Edited.tagUuids - , expertUuids = ChangedValue $ question2Edited.expertUuids - , referenceUuids = ChangedValue $ question2Edited.referenceUuids - , answerUuids = ChangedValue $ question2Edited.answerUuids + { title = ChangedValue question2Edited.title + , text = ChangedValue question2Edited.text + , requiredPhaseUuid = ChangedValue question2Edited.requiredPhaseUuid + , annotations = ChangedValue question2Edited.annotations + , tagUuids = ChangedValue question2Edited.tagUuids + , expertUuids = ChangedValue question2Edited.expertUuids + , referenceUuids = ChangedValue question2Edited.referenceUuids + , answerUuids = ChangedValue question2Edited.answerUuids } e_km1_ch1_q2_second_edit :: KnowledgeModelEvent @@ -501,13 +501,13 @@ e_km1_ch1_q2_second_edit = EditOptionsQuestionEvent' $ EditOptionsQuestionEvent { title = ChangedValue "New title" - , text = ChangedValue $ question2Edited.text - , requiredPhaseUuid = ChangedValue $ question2Edited.requiredPhaseUuid - , annotations = ChangedValue $ question2Edited.annotations - , tagUuids = ChangedValue $ question2Edited.tagUuids - , expertUuids = ChangedValue $ question2Edited.expertUuids - , referenceUuids = ChangedValue $ question2Edited.referenceUuids - , answerUuids = ChangedValue $ question2Edited.answerUuids + , text = ChangedValue question2Edited.text + , requiredPhaseUuid = ChangedValue question2Edited.requiredPhaseUuid + , annotations = ChangedValue question2Edited.annotations + , tagUuids = ChangedValue question2Edited.tagUuids + , expertUuids = ChangedValue question2Edited.expertUuids + , referenceUuids = ChangedValue question2Edited.referenceUuids + , answerUuids = ChangedValue question2Edited.answerUuids } , createdAt = dt'' 2018 1 21 0 } @@ -522,10 +522,10 @@ e_km1_ch1_q2_type = EditQuestionEvent' $ EditListQuestionEvent' $ EditListQuestionEvent - { title = ChangedValue $ question2WithNewType.title + { title = ChangedValue question2WithNewType.title , text = NothingChanged , requiredPhaseUuid = NothingChanged - , annotations = ChangedValue $ question2WithNewType.annotations + , annotations = ChangedValue question2WithNewType.annotations , tagUuids = NothingChanged , expertUuids = NothingChanged , referenceUuids = NothingChanged @@ -544,14 +544,14 @@ e_km1_ch2_q4 = EditQuestionEvent' $ EditListQuestionEvent' $ EditListQuestionEvent - { title = ChangedValue $ question4Edited.title - , text = ChangedValue $ question4Edited.text - , requiredPhaseUuid = ChangedValue $ question4Edited.requiredPhaseUuid - , annotations = ChangedValue $ question4Edited.annotations - , tagUuids = ChangedValue $ question4Edited.tagUuids - , expertUuids = ChangedValue $ question4Edited.expertUuids - , referenceUuids = ChangedValue $ question4Edited.referenceUuids - , itemTemplateQuestionUuids = ChangedValue $ question4Edited.itemTemplateQuestionUuids + { title = ChangedValue question4Edited.title + , text = ChangedValue question4Edited.text + , requiredPhaseUuid = ChangedValue question4Edited.requiredPhaseUuid + , annotations = ChangedValue question4Edited.annotations + , tagUuids = ChangedValue question4Edited.tagUuids + , expertUuids = ChangedValue question4Edited.expertUuids + , referenceUuids = ChangedValue question4Edited.referenceUuids + , itemTemplateQuestionUuids = ChangedValue question4Edited.itemTemplateQuestionUuids } , createdAt = dt'' 2018 1 21 0 } @@ -566,15 +566,15 @@ e_km1_ch2_q4_type = EditQuestionEvent' $ EditIntegrationQuestionEvent' $ EditIntegrationQuestionEvent - { title = ChangedValue $ question4WithNewType.title + { title = ChangedValue question4WithNewType.title , text = NothingChanged , requiredPhaseUuid = NothingChanged - , annotations = ChangedValue $ question4WithNewType.annotations + , annotations = ChangedValue question4WithNewType.annotations , tagUuids = NothingChanged , expertUuids = NothingChanged , referenceUuids = NothingChanged - , integrationUuid = ChangedValue $ question4WithNewType.integrationUuid - , variables = ChangedValue $ question4WithNewType.variables + , integrationUuid = ChangedValue question4WithNewType.integrationUuid + , variables = ChangedValue question4WithNewType.variables } , createdAt = dt'' 2018 1 21 0 } @@ -589,15 +589,15 @@ e_km1_ch3_q9 = EditQuestionEvent' $ EditIntegrationQuestionEvent' $ EditIntegrationQuestionEvent - { title = ChangedValue $ question9Edited.title - , text = ChangedValue $ question9Edited.text - , requiredPhaseUuid = ChangedValue $ question9Edited.requiredPhaseUuid - , annotations = ChangedValue $ question9Edited.annotations - , tagUuids = ChangedValue $ question9Edited.tagUuids - , expertUuids = ChangedValue $ question9Edited.expertUuids - , referenceUuids = ChangedValue $ question9Edited.referenceUuids - , integrationUuid = ChangedValue $ question9Edited.integrationUuid - , variables = ChangedValue $ question9Edited.variables + { title = ChangedValue question9Edited.title + , text = ChangedValue question9Edited.text + , requiredPhaseUuid = ChangedValue question9Edited.requiredPhaseUuid + , annotations = ChangedValue question9Edited.annotations + , tagUuids = ChangedValue question9Edited.tagUuids + , expertUuids = ChangedValue question9Edited.expertUuids + , referenceUuids = ChangedValue question9Edited.referenceUuids + , integrationUuid = ChangedValue question9Edited.integrationUuid + , variables = ChangedValue question9Edited.variables } , createdAt = dt'' 2018 1 21 0 } @@ -612,14 +612,14 @@ e_km1_ch3_q9_type = EditQuestionEvent' $ EditValueQuestionEvent' $ EditValueQuestionEvent - { title = ChangedValue $ question9WithNewType.title + { title = ChangedValue question9WithNewType.title , text = NothingChanged , requiredPhaseUuid = NothingChanged - , annotations = ChangedValue $ question9WithNewType.annotations + , annotations = ChangedValue question9WithNewType.annotations , tagUuids = NothingChanged , expertUuids = NothingChanged , referenceUuids = NothingChanged - , valueType = ChangedValue $ question9WithNewType.valueType + , valueType = ChangedValue question9WithNewType.valueType , validations = NothingChanged } , createdAt = dt'' 2018 1 21 0 @@ -635,14 +635,14 @@ e_km1_ch3_q11 = EditQuestionEvent' $ EditMultiChoiceQuestionEvent' $ EditMultiChoiceQuestionEvent - { title = ChangedValue $ question11Edited.title - , text = ChangedValue $ question11Edited.text - , requiredPhaseUuid = ChangedValue $ question11Edited.requiredPhaseUuid - , annotations = ChangedValue $ question11Edited.annotations - , tagUuids = ChangedValue $ question11Edited.tagUuids - , expertUuids = ChangedValue $ question11Edited.expertUuids - , referenceUuids = ChangedValue $ question11Edited.referenceUuids - , choiceUuids = ChangedValue $ question11Edited.choiceUuids + { title = ChangedValue question11Edited.title + , text = ChangedValue question11Edited.text + , requiredPhaseUuid = ChangedValue question11Edited.requiredPhaseUuid + , annotations = ChangedValue question11Edited.annotations + , tagUuids = ChangedValue question11Edited.tagUuids + , expertUuids = ChangedValue question11Edited.expertUuids + , referenceUuids = ChangedValue question11Edited.referenceUuids + , choiceUuids = ChangedValue question11Edited.choiceUuids } , createdAt = dt'' 2018 1 21 0 } @@ -657,14 +657,14 @@ e_km1_ch3_q13 = EditQuestionEvent' $ EditItemSelectQuestionEvent' $ EditItemSelectQuestionEvent - { title = ChangedValue $ question13Edited.title - , text = ChangedValue $ question13Edited.text - , requiredPhaseUuid = ChangedValue $ question13Edited.requiredPhaseUuid - , annotations = ChangedValue $ question13Edited.annotations - , tagUuids = ChangedValue $ question13Edited.tagUuids - , expertUuids = ChangedValue $ question13Edited.expertUuids - , referenceUuids = ChangedValue $ question13Edited.referenceUuids - , listQuestionUuid = ChangedValue $ question13Edited.listQuestionUuid + { title = ChangedValue question13Edited.title + , text = ChangedValue question13Edited.text + , requiredPhaseUuid = ChangedValue question13Edited.requiredPhaseUuid + , annotations = ChangedValue question13Edited.annotations + , tagUuids = ChangedValue question13Edited.tagUuids + , expertUuids = ChangedValue question13Edited.expertUuids + , referenceUuids = ChangedValue question13Edited.referenceUuids + , listQuestionUuid = ChangedValue question13Edited.listQuestionUuid } , createdAt = dt'' 2018 1 21 0 } @@ -930,11 +930,11 @@ e_km1_ch1_q2_aYes1 = , content = EditAnswerEvent' $ EditAnswerEvent - { aLabel = ChangedValue $ q2_answerYesEdited.aLabel - , advice = ChangedValue $ q2_answerYesEdited.advice - , annotations = ChangedValue $ q2_answerYesEdited.annotations - , followUpUuids = ChangedValue $ q2_answerYesEdited.followUpUuids - , metricMeasures = ChangedValue $ q2_answerYesEdited.metricMeasures + { aLabel = ChangedValue q2_answerYesEdited.aLabel + , advice = ChangedValue q2_answerYesEdited.advice + , annotations = ChangedValue q2_answerYesEdited.annotations + , followUpUuids = ChangedValue q2_answerYesEdited.followUpUuids + , metricMeasures = ChangedValue q2_answerYesEdited.metricMeasures } , createdAt = dt'' 2018 1 21 0 } @@ -952,11 +952,11 @@ e_km1_ch1_q2_aYes1_2 = e_km1_ch1_q2_aYes1_2__content :: EditAnswerEvent e_km1_ch1_q2_aYes1_2__content = EditAnswerEvent - { aLabel = ChangedValue $ q2_answerYesEdited.aLabel - , advice = ChangedValue $ q2_answerYesEdited.advice - , annotations = ChangedValue $ q2_answerYesEdited.annotations - , followUpUuids = ChangedValue $ q2_answerYes.followUpUuids - , metricMeasures = ChangedValue $ q2_answerYes.metricMeasures + { aLabel = ChangedValue q2_answerYesEdited.aLabel + , advice = ChangedValue q2_answerYesEdited.advice + , annotations = ChangedValue q2_answerYesEdited.annotations + , followUpUuids = ChangedValue q2_answerYes.followUpUuids + , metricMeasures = ChangedValue q2_answerYes.metricMeasures } d_km1_ch1_q2_aYes1 :: KnowledgeModelEvent @@ -1105,11 +1105,11 @@ e_km1_ch2_q4_it1_q5 = e_km1_ch2_q4_it1_q5__content :: EditListQuestionEvent e_km1_ch2_q4_it1_q5__content = EditListQuestionEvent - { title = ChangedValue $ q4_it1_question5Edited.title - , text = ChangedValue $ q4_it1_question5Edited.text - , requiredPhaseUuid = ChangedValue $ q4_it1_question5Edited.requiredPhaseUuid - , annotations = ChangedValue $ q4_it1_question5Edited.annotations - , tagUuids = ChangedValue $ q4_it1_question5Edited.tagUuids + { title = ChangedValue q4_it1_question5Edited.title + , text = ChangedValue q4_it1_question5Edited.text + , requiredPhaseUuid = ChangedValue q4_it1_question5Edited.requiredPhaseUuid + , annotations = ChangedValue q4_it1_question5Edited.annotations + , tagUuids = ChangedValue q4_it1_question5Edited.tagUuids , expertUuids = NothingChanged , referenceUuids = NothingChanged , itemTemplateQuestionUuids = ChangedValue [q4_it1_q5_it2_question8.uuid, q4_it1_q5_it2_question7.uuid] @@ -1128,14 +1128,14 @@ e_km1_ch2_q4_it1_q6 = e_km1_ch2_q4_it1_q6__content :: EditOptionsQuestionEvent e_km1_ch2_q4_it1_q6__content = EditOptionsQuestionEvent - { title = ChangedValue $ q4_it1_question6Edited.title - , text = ChangedValue $ q4_it1_question6Edited.text - , requiredPhaseUuid = ChangedValue $ q4_it1_question6Edited.requiredPhaseUuid - , annotations = ChangedValue $ q4_it1_question6Edited.annotations - , tagUuids = ChangedValue $ q4_it1_question6Edited.tagUuids - , expertUuids = ChangedValue $ q4_it1_question6Edited.expertUuids - , referenceUuids = ChangedValue $ q4_it1_question6Edited.referenceUuids - , answerUuids = ChangedValue $ q4_it1_question6Edited.answerUuids + { title = ChangedValue q4_it1_question6Edited.title + , text = ChangedValue q4_it1_question6Edited.text + , requiredPhaseUuid = ChangedValue q4_it1_question6Edited.requiredPhaseUuid + , annotations = ChangedValue q4_it1_question6Edited.annotations + , tagUuids = ChangedValue q4_it1_question6Edited.tagUuids + , expertUuids = ChangedValue q4_it1_question6Edited.expertUuids + , referenceUuids = ChangedValue q4_it1_question6Edited.referenceUuids + , answerUuids = ChangedValue q4_it1_question6Edited.answerUuids } d_km1_ch2_q4_it1_q5 :: KnowledgeModelEvent @@ -1260,14 +1260,14 @@ e_km1_ch1_ansYes1_fuq1_ansYes3_fuq2 = EditQuestionEvent' $ EditOptionsQuestionEvent' $ EditOptionsQuestionEvent - { title = ChangedValue $ q2_aYes_fuq1_aYes_fuQuestion2Edited.title - , text = ChangedValue $ q2_aYes_fuq1_aYes_fuQuestion2Edited.text - , requiredPhaseUuid = ChangedValue $ q2_aYes_fuq1_aYes_fuQuestion2Edited.requiredPhaseUuid - , annotations = ChangedValue $ q2_aYes_fuq1_aYes_fuQuestion2Edited.annotations - , tagUuids = ChangedValue $ q2_aYes_fuq1_aYes_fuQuestion2Edited.tagUuids - , expertUuids = ChangedValue $ q2_aYes_fuq1_aYes_fuQuestion2Edited.expertUuids - , referenceUuids = ChangedValue $ q2_aYes_fuq1_aYes_fuQuestion2Edited.referenceUuids - , answerUuids = ChangedValue $ q2_aYes_fuq1_aYes_fuQuestion2Edited.answerUuids + { title = ChangedValue q2_aYes_fuq1_aYes_fuQuestion2Edited.title + , text = ChangedValue q2_aYes_fuq1_aYes_fuQuestion2Edited.text + , requiredPhaseUuid = ChangedValue q2_aYes_fuq1_aYes_fuQuestion2Edited.requiredPhaseUuid + , annotations = ChangedValue q2_aYes_fuq1_aYes_fuQuestion2Edited.annotations + , tagUuids = ChangedValue q2_aYes_fuq1_aYes_fuQuestion2Edited.tagUuids + , expertUuids = ChangedValue q2_aYes_fuq1_aYes_fuQuestion2Edited.expertUuids + , referenceUuids = ChangedValue q2_aYes_fuq1_aYes_fuQuestion2Edited.referenceUuids + , answerUuids = ChangedValue q2_aYes_fuq1_aYes_fuQuestion2Edited.answerUuids } , createdAt = dt'' 2018 1 21 0 } @@ -1285,13 +1285,13 @@ e_km1_ch1_ansYes1_fuq1_ansYes3_fuq2_2 = e_km1_ch1_ansYes1_fuq1_ansYes3_fuq2_2__content :: EditOptionsQuestionEvent e_km1_ch1_ansYes1_fuq1_ansYes3_fuq2_2__content = EditOptionsQuestionEvent - { title = ChangedValue $ q2_aYes_fuq1_aYes_fuQuestion2Edited.title - , text = ChangedValue $ q2_aYes_fuq1_aYes_fuQuestion2Edited.text - , requiredPhaseUuid = ChangedValue $ q2_aYes_fuq1_aYes_fuQuestion2Edited.requiredPhaseUuid - , annotations = ChangedValue $ q2_aYes_fuq1_aYes_fuQuestion2Edited.annotations - , tagUuids = ChangedValue $ q2_aYes_fuq1_aYes_fuQuestion2Edited.tagUuids - , expertUuids = ChangedValue $ q2_aYes_fuq1_aYes_fuQuestion2.expertUuids - , referenceUuids = ChangedValue $ q2_aYes_fuq1_aYes_fuQuestion2.referenceUuids + { title = ChangedValue q2_aYes_fuq1_aYes_fuQuestion2Edited.title + , text = ChangedValue q2_aYes_fuq1_aYes_fuQuestion2Edited.text + , requiredPhaseUuid = ChangedValue q2_aYes_fuq1_aYes_fuQuestion2Edited.requiredPhaseUuid + , annotations = ChangedValue q2_aYes_fuq1_aYes_fuQuestion2Edited.annotations + , tagUuids = ChangedValue q2_aYes_fuq1_aYes_fuQuestion2Edited.tagUuids + , expertUuids = ChangedValue q2_aYes_fuq1_aYes_fuQuestion2.expertUuids + , referenceUuids = ChangedValue q2_aYes_fuq1_aYes_fuQuestion2.referenceUuids , answerUuids = ChangedValue [q2_aYes_fuq1_aYes_fuq2_answerYes.uuid, q2_aYes_fuq1_aYes_fuq2_answerNo.uuid] } @@ -1308,11 +1308,11 @@ e_km1_ch2_ansMaybe6_fuq4 = e_km1_ch2_ansMaybe6_fuq4__content :: EditListQuestionEvent e_km1_ch2_ansMaybe6_fuq4__content = EditListQuestionEvent - { title = ChangedValue $ q4_it1_q6_aYes_followUpQuestion4Edited.title - , text = ChangedValue $ q4_it1_q6_aYes_followUpQuestion4Edited.text - , requiredPhaseUuid = ChangedValue $ q4_it1_q6_aYes_followUpQuestion4Edited.requiredPhaseUuid - , annotations = ChangedValue $ q4_it1_q6_aYes_followUpQuestion4Edited.annotations - , tagUuids = ChangedValue $ q4_it1_q6_aYes_followUpQuestion4Edited.tagUuids + { title = ChangedValue q4_it1_q6_aYes_followUpQuestion4Edited.title + , text = ChangedValue q4_it1_q6_aYes_followUpQuestion4Edited.text + , requiredPhaseUuid = ChangedValue q4_it1_q6_aYes_followUpQuestion4Edited.requiredPhaseUuid + , annotations = ChangedValue q4_it1_q6_aYes_followUpQuestion4Edited.annotations + , tagUuids = ChangedValue q4_it1_q6_aYes_followUpQuestion4Edited.tagUuids , expertUuids = NothingChanged , referenceUuids = NothingChanged , itemTemplateQuestionUuids = ChangedValue [q4_it1_q6_aYes_fuq4_it_question2.uuid, q4_it1_q6_aYes_fuq4_it_question1.uuid] @@ -1384,8 +1384,8 @@ e_km1_ch3_q11_cho1 = , content = EditChoiceEvent' $ EditChoiceEvent - { aLabel = ChangedValue $ q11_choice1Edited.aLabel - , annotations = ChangedValue $ q11_choice1Edited.annotations + { aLabel = ChangedValue q11_choice1Edited.aLabel + , annotations = ChangedValue q11_choice1Edited.annotations } , createdAt = dt'' 2018 1 21 0 } @@ -1491,9 +1491,9 @@ e_km1_ch1_q2_eAlbert = , content = EditExpertEvent' $ EditExpertEvent - { name = ChangedValue $ km1_ch1_q2_eAlbertEdited.name - , email = ChangedValue $ km1_ch1_q2_eAlbertEdited.email - , annotations = ChangedValue $ km1_ch1_q2_eAlbertEdited.annotations + { name = ChangedValue km1_ch1_q2_eAlbertEdited.name + , email = ChangedValue km1_ch1_q2_eAlbertEdited.email + , annotations = ChangedValue km1_ch1_q2_eAlbertEdited.annotations } , createdAt = dt'' 2018 1 21 0 } @@ -1603,8 +1603,8 @@ e_km1_ch1_q2_rCh1 = EditReferenceEvent' $ EditResourcePageReferenceEvent' $ EditResourcePageReferenceEvent - { resourcePageUuid = ChangedValue $ km1_ch1_q2_r1Edited.resourcePageUuid - , annotations = ChangedValue $ km1_ch1_q2_r1Edited.annotations + { resourcePageUuid = ChangedValue km1_ch1_q2_r1Edited.resourcePageUuid + , annotations = ChangedValue km1_ch1_q2_r1Edited.annotations } , createdAt = dt'' 2018 1 21 0 } @@ -1619,9 +1619,9 @@ e_km1_ch1_q2_rCh1_type = EditReferenceEvent' $ EditURLReferenceEvent' $ EditURLReferenceEvent - { url = ChangedValue $ km1_ch1_q2_r1WithNewType.url - , aLabel = ChangedValue $ km1_ch1_q2_r1WithNewType.aLabel - , annotations = ChangedValue $ km1_ch1_q2_r1WithNewType.annotations + { url = ChangedValue km1_ch1_q2_r1WithNewType.url + , aLabel = ChangedValue km1_ch1_q2_r1WithNewType.aLabel + , annotations = ChangedValue km1_ch1_q2_r1WithNewType.annotations } , createdAt = dt'' 2018 1 21 0 } @@ -1636,9 +1636,9 @@ e_km1_ch1_q2_rCh2 = EditReferenceEvent' $ EditURLReferenceEvent' $ EditURLReferenceEvent - { url = ChangedValue $ km1_ch1_q2_r2Edited.url - , aLabel = ChangedValue $ km1_ch1_q2_r2Edited.aLabel - , annotations = ChangedValue $ km1_ch1_q2_r2Edited.annotations + { url = ChangedValue km1_ch1_q2_r2Edited.url + , aLabel = ChangedValue km1_ch1_q2_r2Edited.aLabel + , annotations = ChangedValue km1_ch1_q2_r2Edited.annotations } , createdAt = dt'' 2018 1 21 0 } @@ -1653,9 +1653,9 @@ e_km1_ch1_q2_rCh2_type = EditReferenceEvent' $ EditCrossReferenceEvent' $ EditCrossReferenceEvent - { targetUuid = ChangedValue $ km1_ch1_q2_r2WithNewType.targetUuid - , description = ChangedValue $ km1_ch1_q2_r2WithNewType.description - , annotations = ChangedValue $ km1_ch1_q2_r2WithNewType.annotations + { targetUuid = ChangedValue km1_ch1_q2_r2WithNewType.targetUuid + , description = ChangedValue km1_ch1_q2_r2WithNewType.description + , annotations = ChangedValue km1_ch1_q2_r2WithNewType.annotations } , createdAt = dt'' 2018 1 21 0 } @@ -1670,9 +1670,9 @@ e_km1_ch1_q2_rCh3 = EditReferenceEvent' $ EditCrossReferenceEvent' $ EditCrossReferenceEvent - { targetUuid = ChangedValue $ km1_ch1_q2_r3Edited.targetUuid - , description = ChangedValue $ km1_ch1_q2_r3Edited.description - , annotations = ChangedValue $ km1_ch1_q2_r3Edited.annotations + { targetUuid = ChangedValue km1_ch1_q2_r3Edited.targetUuid + , description = ChangedValue km1_ch1_q2_r3Edited.description + , annotations = ChangedValue km1_ch1_q2_r3Edited.annotations } , createdAt = dt'' 2018 1 21 0 } @@ -1687,8 +1687,8 @@ e_km1_ch1_q2_rCh3_type = EditReferenceEvent' $ EditResourcePageReferenceEvent' $ EditResourcePageReferenceEvent - { resourcePageUuid = ChangedValue $ km1_ch1_q2_r3WithNewType.resourcePageUuid - , annotations = ChangedValue $ km1_ch1_q2_r3WithNewType.annotations + { resourcePageUuid = ChangedValue km1_ch1_q2_r3WithNewType.resourcePageUuid + , annotations = ChangedValue km1_ch1_q2_r3WithNewType.annotations } , createdAt = dt'' 2018 1 21 0 } @@ -1748,10 +1748,10 @@ e_km1_tds = , content = EditTagEvent' $ EditTagEvent - { name = ChangedValue $ tagDataScienceEdited.name - , description = ChangedValue $ tagDataScienceEdited.description - , color = ChangedValue $ tagDataScienceEdited.color - , annotations = ChangedValue $ tagDataScienceEdited.annotations + { name = ChangedValue tagDataScienceEdited.name + , description = ChangedValue tagDataScienceEdited.description + , color = ChangedValue tagDataScienceEdited.color + , annotations = ChangedValue tagDataScienceEdited.annotations } , createdAt = dt'' 2018 1 21 0 } @@ -1855,11 +1855,11 @@ e_km1_io = EditIntegrationEvent' $ EditPluginIntegrationEvent' $ EditPluginIntegrationEvent - { name = ChangedValue $ orcidPluginIntegrationEdited.name - , pluginUuid = ChangedValue $ orcidPluginIntegrationEdited.pluginUuid - , pluginIntegrationId = ChangedValue $ orcidPluginIntegrationEdited.pluginIntegrationId - , pluginIntegrationSettings = ChangedValue $ orcidPluginIntegrationEdited.pluginIntegrationSettings - , annotations = ChangedValue $ orcidPluginIntegrationEdited.annotations + { name = ChangedValue orcidPluginIntegrationEdited.name + , pluginUuid = ChangedValue orcidPluginIntegrationEdited.pluginUuid + , pluginIntegrationId = ChangedValue orcidPluginIntegrationEdited.pluginIntegrationId + , pluginIntegrationSettings = ChangedValue orcidPluginIntegrationEdited.pluginIntegrationSettings + , annotations = ChangedValue orcidPluginIntegrationEdited.annotations } , createdAt = dt'' 2018 1 21 0 } @@ -1987,10 +1987,10 @@ e_km1_mtrF = , content = EditMetricEvent' $ EditMetricEvent - { title = ChangedValue $ metricFEdited.title - , abbreviation = ChangedValue $ metricFEdited.abbreviation - , description = ChangedValue $ metricFEdited.description - , annotations = ChangedValue $ metricFEdited.annotations + { title = ChangedValue metricFEdited.title + , abbreviation = ChangedValue metricFEdited.abbreviation + , description = ChangedValue metricFEdited.description + , annotations = ChangedValue metricFEdited.annotations } , createdAt = dt'' 2018 1 21 0 } @@ -2064,9 +2064,9 @@ e_km1_phs1 = , content = EditPhaseEvent' $ EditPhaseEvent - { title = ChangedValue $ phase1Edited.title - , description = ChangedValue $ phase1Edited.description - , annotations = ChangedValue $ phase1Edited.annotations + { title = ChangedValue phase1Edited.title + , description = ChangedValue phase1Edited.description + , annotations = ChangedValue phase1Edited.annotations } , createdAt = dt'' 2018 1 21 0 } diff --git a/shared-common/src/Shared/KnowledgeModel/Database/Migration/Development/KnowledgeModel/Data/Questions.hs b/shared-common/src/Shared/KnowledgeModel/Database/Migration/Development/KnowledgeModel/Data/Questions.hs index 31d98fabf..01d911d20 100644 --- a/shared-common/src/Shared/KnowledgeModel/Database/Migration/Development/KnowledgeModel/Data/Questions.hs +++ b/shared-common/src/Shared/KnowledgeModel/Database/Migration/Development/KnowledgeModel/Data/Questions.hs @@ -22,7 +22,7 @@ question1 = { uuid = u' "00000000-0000-0000-0000-0000000000f1" , title = "First Question" , text = Just "Here is a description of question" - , requiredPhaseUuid = Just $ phase1.uuid + , requiredPhaseUuid = Just phase1.uuid , annotations = [] , tagUuids = [tagDataScience.uuid, tagBioinformatics.uuid] , referenceUuids = [] @@ -77,7 +77,7 @@ question2 = , title = "Is there any pre-existing data?" , text = Just "Are there any data sets available in the world that are relevant to your planned research?" - , requiredPhaseUuid = Just $ phase2.uuid + , requiredPhaseUuid = Just phase2.uuid , annotations = [] , tagUuids = [tagBioinformatics.uuid] , referenceUuids = [km1_ch1_q2_r1.uuid, km1_ch1_q2_r2.uuid] @@ -94,7 +94,7 @@ question2Edited = { uuid = question2.uuid , title = "EDITED: Second Question" , text = Just "EDITED: Some long description" - , requiredPhaseUuid = Just $ phase3.uuid + , requiredPhaseUuid = Just phase3.uuid , annotations = [] , tagUuids = [tagDataScience.uuid, tagBioinformatics.uuid] , referenceUuids = [km1_ch1_q2_r2.uuid, km1_ch1_q2_r1.uuid] @@ -145,7 +145,7 @@ question3 = { uuid = u' "00000000-0000-0000-0000-0000000000f3" , title = "Third Question" , text = Just "Some long description" - , requiredPhaseUuid = Just $ phase2.uuid + , requiredPhaseUuid = Just phase2.uuid , annotations = [] , tagUuids = [] , referenceUuids = [] @@ -162,7 +162,7 @@ question3Plain = { uuid = question3.uuid , title = "Third Question" , text = Just "Some long description" - , requiredPhaseUuid = Just $ phase2.uuid + , requiredPhaseUuid = Just phase2.uuid , annotations = [] , tagUuids = [] , referenceUuids = [] @@ -196,7 +196,7 @@ question4Edited = { uuid = question4.uuid , title = "EDITED: " ++ question4.title , text = Just $ "EDITED: " ++ fromJust question4.text - , requiredPhaseUuid = Just $ phase2.uuid + , requiredPhaseUuid = Just phase2.uuid , annotations = question4.annotations , tagUuids = question4.tagUuids , referenceUuids = question4.referenceUuids @@ -248,7 +248,7 @@ q4_it1_question5 = { uuid = u' "00000000-0000-0000-0000-0000000000f5" , title = "Fifth Question" , text = Just "Some funny description" - , requiredPhaseUuid = Just $ phase1.uuid + , requiredPhaseUuid = Just phase1.uuid , annotations = [] , tagUuids = [tagBioinformatics.uuid] , referenceUuids = [] @@ -282,7 +282,7 @@ q4_it1_question5Edited = { uuid = q4_it1_question5.uuid , title = "EDITED: Fifth Question" , text = Just "EDITED: Some funny description" - , requiredPhaseUuid = Just $ phase3.uuid + , requiredPhaseUuid = Just phase3.uuid , annotations = q4_it1_question5.annotations , tagUuids = q4_it1_question5.tagUuids , referenceUuids = q4_it1_question5.referenceUuids @@ -299,7 +299,7 @@ q4_it1_question6 = { uuid = u' "00000000-0000-0000-0000-0000000000f6" , title = "Sixth Question" , text = Just "Some non-funny description" - , requiredPhaseUuid = Just $ phase2.uuid + , requiredPhaseUuid = Just phase2.uuid , annotations = [] , tagUuids = [] , referenceUuids = [km1_ch2_q6_r1.uuid, km1_ch2_q6_r2.uuid] @@ -333,7 +333,7 @@ q4_it1_q5_it2_question7 = { uuid = u' "00000000-0000-0000-0000-0000000000f7" , title = "Seventh Question" , text = Just "Some non-funny description" - , requiredPhaseUuid = Just $ phase2.uuid + , requiredPhaseUuid = Just phase2.uuid , annotations = [] , tagUuids = [] , referenceUuids = [] @@ -351,7 +351,7 @@ q4_it1_q5_it2_question8 = { uuid = u' "00000000-0000-0000-0000-0000000000f8" , title = "Eighth Question" , text = Just "Some non-funny description" - , requiredPhaseUuid = Just $ phase2.uuid + , requiredPhaseUuid = Just phase2.uuid , annotations = [] , tagUuids = [] , referenceUuids = [] @@ -369,7 +369,7 @@ question9 = { uuid = u' "00000000-0000-0000-0000-0000000000f9" , title = "Ninth Question" , text = Just "Some nice description" - , requiredPhaseUuid = Just $ phase1.uuid + , requiredPhaseUuid = Just phase1.uuid , annotations = [] , tagUuids = [tagBioinformatics.uuid] , referenceUuids = [] @@ -387,7 +387,7 @@ question9Edited = { uuid = question9.uuid , title = "EDITED: " ++ question9.title , text = Just $ "EDITED: " ++ fromJust question9.text - , requiredPhaseUuid = Just $ phase4.uuid + , requiredPhaseUuid = Just phase4.uuid , annotations = [] , tagUuids = [tagDataScience.uuid] , referenceUuids = question9.referenceUuids @@ -511,7 +511,7 @@ question11Edited = question11 { title = "EDITED: Eleventh Question" , text = Just "EDITED: Some non-funny description" - , requiredPhaseUuid = Just $ phase2.uuid + , requiredPhaseUuid = Just phase2.uuid , annotations = [] , referenceUuids = [] , expertUuids = [] @@ -561,7 +561,7 @@ question13Edited = { uuid = question13.uuid , title = "EDITED: Thirteen Question" , text = Just "EDITED: Some non-funny description" - , requiredPhaseUuid = Just $ phase2.uuid + , requiredPhaseUuid = Just phase2.uuid , annotations = [] , tagUuids = [tagBioinformatics.uuid] , referenceUuids = [] @@ -596,7 +596,7 @@ question14Edited = { uuid = question14.uuid , title = "EDITED: Fourteen Question" , text = Just "EDITED: Some non-funny description" - , requiredPhaseUuid = Just $ phase2.uuid + , requiredPhaseUuid = Just phase2.uuid , annotations = [] , tagUuids = [tagBioinformatics.uuid] , referenceUuids = [] diff --git a/shared-common/src/Shared/PersistentCommand/Database/DAO/PersistentCommand/PersistentCommandDAO.hs b/shared-common/src/Shared/PersistentCommand/Database/DAO/PersistentCommand/PersistentCommandDAO.hs index df38e6759..ebc2dcd01 100644 --- a/shared-common/src/Shared/PersistentCommand/Database/DAO/PersistentCommand/PersistentCommandDAO.hs +++ b/shared-common/src/Shared/PersistentCommand/Database/DAO/PersistentCommand/PersistentCommandDAO.hs @@ -77,7 +77,7 @@ insertPersistentCommand :: (AppContextC s sc m, ToField identity) => PersistentC insertPersistentCommand command = do createInsertFn entityName command context <- ask - case (command.internal, L.find (\lf -> lf.component == command.component) (context.serverConfig'.persistentCommand'.lambdaFunctions)) of + case (command.internal, L.find (\lf -> lf.component == command.component) context.serverConfig'.persistentCommand'.lambdaFunctions) of (True, _) -> notifyPersistentCommandQueue (False, Nothing) -> notifySpecificPersistentCommandQueue command (False, Just lf) -> invokeLambdaFunction (toSimple command) lf @@ -135,5 +135,5 @@ notifySpecificPersistentCommandQueue command = do invokeLambdaFunction :: AppContextC s sc m => PersistentCommandSimple identity -> ServerConfigPersistentCommandLambda -> m Int64 invokeLambdaFunction command lf = do - invokeLambda (lf.functionArn) "{}" + invokeLambda lf.functionArn "{}" return 1 diff --git a/shared-common/src/Shared/PersistentCommand/Service/PersistentCommand/PersistentCommandService.hs b/shared-common/src/Shared/PersistentCommand/Service/PersistentCommand/PersistentCommandService.hs index d3c4289a5..ecea56574 100644 --- a/shared-common/src/Shared/PersistentCommand/Service/PersistentCommand/PersistentCommandService.hs +++ b/shared-common/src/Shared/PersistentCommand/Service/PersistentCommand/PersistentCommandService.hs @@ -154,7 +154,7 @@ retryPersistentCommandsForLambda = do retryPersistentCommandForLambda :: (Show identity, FromField identity, ToField identity, AppContextC s sc m) => PersistentCommandSimple identity -> m () retryPersistentCommandForLambda command = do context <- ask - case L.find (\lf -> lf.component == command.component) (context.serverConfig'.persistentCommand'.lambdaFunctions) of + case L.find (\lf -> lf.component == command.component) context.serverConfig'.persistentCommand'.lambdaFunctions of Just lf -> void $ invokeLambdaFunction command lf Nothing -> logWarnI _CMP_DATABASE (f' "No lambda function found for persistent command '%s'" [U.toString command.uuid]) @@ -165,7 +165,7 @@ sendToSentry :: (Show identity, FromField identity, ToField identity, AppContext sendToSentry command = do context <- ask when - (context.serverConfig'.sentry'.enabled) + context.serverConfig'.sentry'.enabled ( do let sentryDsn = context.serverConfig'.sentry'.dsn sentryService <- liftIO $ initRaven sentryDsn id sendRecord stderrFallback @@ -177,8 +177,8 @@ sendToSentry command = do recordUpdate :: Show identity => String -> PersistentCommand identity -> SentryRecord -> SentryRecord recordUpdate buildVersion command record = let commandUserUuid = maybe "anonymous" show command.createdBy - commandUuid = U.toString $ command.uuid - commandTenantUuid = U.toString $ command.tenantUuid + commandUuid = U.toString command.uuid + commandTenantUuid = U.toString command.tenantUuid in record { srRelease = Just buildVersion , srInterfaces = diff --git a/stack.yaml b/stack.yaml index 31f0ee812..48c5c0ae3 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,6 +1,6 @@ -resolver: nightly-2024-01-10 +snapshot: lts-24.37 -compiler: ghc-9.10.1 +compiler: ghc-9.10.3 packages: - shared-common @@ -21,7 +21,7 @@ extra-deps: - github: haskellify/cron commit: cef3249aae7977b607dd4638a65d6a985b2f5759 - github: haskellify/minio-hs - commit: 83446d193f9bba02b758d2f1bd34a642f575238c + commit: e96186514e5f4ceade5e0867285f2e20cca1e973 - github: JonathanLorimer/hs-connection commit: 1dc000d38963de0e4c3954b27d4fe0e5f1d9cee2 - github: brendanhay/amazonka @@ -32,25 +32,18 @@ extra-deps: - lib/services/amazonka-lambda - lib/services/amazonka-sso - lib/services/amazonka-sts - - microlens-pro-0.2.0.2 - - base64-1.0 - - fsutils-0.1.2 - - hashable-1.5.0.0 - - haskell-src-meta-0.8.14 - - html-entities-1.1.4.7 - - jose-jwt-0.10.0 - - lens-5.3.3 - - oidc-client-0.6.1.0 - - raven-haskell-0.1.4.1 - - servant-swagger-1.2 - - servant-swagger-tags-0.1.0.1 - - servant-swagger-ui-0.3.5.5.0.0 - - servant-swagger-ui-core-0.3.5 - - swagger2-2.8.8 - - text-short-0.1.6 - - text-replace-0.0.0.4 - - th-compat-0.1.6 - - time-parsers-0.2 + - cryptostore-0.5.0.0@sha256:56173cf3adba00c218f1f110d008233660e1cd1538d07124b93c1b7f0ed68b3e,4705 + - fsutils-0.1.2@sha256:fb3eb68e03e4317352032642d3ed18c796c30f5a3bec40caef69cee0b859df5e,1028 + - jwt-0.11.0@sha256:0602735ee4093c6c5bc918461855bcd55499099363bad34eb7a227aeef3cde29,4265 + - microlens-pro-0.2.0.5@sha256:8c4afe7a696682dadd042c1e323d43ae7361a443c29b4992984d54b374f254c3,3376 + - oidc-client-0.8.0.0@sha256:ad04bcb9680c81ca364ed097929265fe79a036b5a2dd556f6ff344146da34afd,3523 + - raven-haskell-0.1.4.1@sha256:c0dbccf85c815cc95bad1ee9332a422b2ad4070f5023818092a9e144e3e0d534,1479 + - servant-swagger-tags-0.1.0.1@sha256:2d743e9ad1cfcca537acc99e0b97e0e4feda3b5c842937dbf5895261e3105bf1,1094 + - text-replace-0.1.0.3@sha256:1ac3a6a18f0e7d5274e14b6e03e3b36b953d8f0a24ee6b43f8a8befb4160b6b6,1628 + - time-parsers-0.2@sha256:393d52ebb968035129a90c9dfd56ea3de8e81900e8c26b33dce1b22571a040f2,1911 + - x509-1.7.7@sha256:90eef2d745a654146fc1c325e035eaddac531e4d2145d4bc1dcf4b8fad439d34,2276 + - x509-store-1.6.9@sha256:1f1abeab5bacf1407b920d0f34f4c35a5ad450ff0d8121cd3dc76460f81e711d,1716 + - x509-validation-1.6.12@sha256:4f4af20ec77f02c042ecd4726c195bb0e0b694b336de81e7bd4515b2917bd9bc,2169 extra-lib-dirs: - ./lib diff --git a/stack.yaml.lock b/stack.yaml.lock index 0976c46f7..aa039343d 100644 --- a/stack.yaml.lock +++ b/stack.yaml.lock @@ -62,14 +62,14 @@ packages: - completed: name: minio-hs pantry-tree: - sha256: 78fda4b96ecdb677c18f56d06c1ba465146aa17627fcd1669149e7d4d6a1df70 + sha256: 6a6caed84fbafb696e6dfe340ab2f8d922f5709f0b948f5e1e05f085245de3ac size: 4744 - sha256: 7d591fcb502b70545f4dc41274cecde1debaf78c7094c5186b808d76458996ac - size: 98165 - url: https://github.com/haskellify/minio-hs/archive/83446d193f9bba02b758d2f1bd34a642f575238c.tar.gz + sha256: 12e9c62bee1873c8d472c50065c1421252ec67ab1ca3fce43737a051c21cba41 + size: 98821 + url: https://github.com/haskellify/minio-hs/archive/e96186514e5f4ceade5e0867285f2e20cca1e973.tar.gz version: 1.7.0 original: - url: https://github.com/haskellify/minio-hs/archive/83446d193f9bba02b758d2f1bd34a642f575238c.tar.gz + url: https://github.com/haskellify/minio-hs/archive/e96186514e5f4ceade5e0867285f2e20cca1e973.tar.gz - completed: name: connection pantry-tree: @@ -147,141 +147,92 @@ packages: subdir: lib/services/amazonka-sts url: https://github.com/brendanhay/amazonka/archive/f3a7fca02fdbb832cc348e991983b1465225d50c.tar.gz - completed: - hackage: microlens-pro-0.2.0.2@sha256:2fd14b7f87d6aa76700dabf65fcdda835aa329a4fdd8a44eebdf399e798af7ab,3377 + hackage: cryptostore-0.5.0.0@sha256:56173cf3adba00c218f1f110d008233660e1cd1538d07124b93c1b7f0ed68b3e,4705 pantry-tree: - sha256: be8ac1093c45ec46d640c56c06d8826d364ad1243d601e731e37581e8579e9c3 - size: 430 - original: - hackage: microlens-pro-0.2.0.2 -- completed: - hackage: base64-1.0@sha256:ab8084608505f30d6cf7dd790271f927fd8a00956c5e7f5546f5cf56b298022c,2991 - pantry-tree: - sha256: 62150ae24db8e07f966679024406de4cdfe13556c9afce807f4f24d7ec03d0b5 - size: 2229 + sha256: 727b57b10811a68b29ef93ffde70a0bc42c2128623fe970c617e7c827c8144b6 + size: 8870 original: - hackage: base64-1.0 + hackage: cryptostore-0.5.0.0@sha256:56173cf3adba00c218f1f110d008233660e1cd1538d07124b93c1b7f0ed68b3e,4705 - completed: hackage: fsutils-0.1.2@sha256:fb3eb68e03e4317352032642d3ed18c796c30f5a3bec40caef69cee0b859df5e,1028 pantry-tree: sha256: f92ef28c1edc20a1653f074bc85e7862c81ff850893b4417b64a8582ce62b531 size: 210 original: - hackage: fsutils-0.1.2 -- completed: - hackage: hashable-1.5.0.0@sha256:2f23146cbe0325029927b221647695a4c7d6e97548ff731110979e34361f58ef,5914 - pantry-tree: - sha256: 3129079baae1af3e7c9dd4585ae667138b69892cefa7c40c392d2cdaefa757c8 - size: 1578 - original: - hackage: hashable-1.5.0.0 -- completed: - hackage: haskell-src-meta-0.8.14@sha256:80acc5646e6dfead5f08307e3296a9b455bc7753fa6bc07f7813057713e3fd58,2542 - pantry-tree: - sha256: ed2553c05c050a5dc09257810d46cb023fde7d94d3b11c4cf83f18a65f0f0507 - size: 1120 - original: - hackage: haskell-src-meta-0.8.14 -- completed: - hackage: html-entities-1.1.4.7@sha256:3929ff34cbd35a841b0f57037cf7e1d93a66b61197ab279aad7f71c715ad514c,1953 - pantry-tree: - sha256: cf88898407173f9cdc58a0639604cfbcff7440f84053ad8969aa91b87ea0d5fb - size: 540 - original: - hackage: html-entities-1.1.4.7 + hackage: fsutils-0.1.2@sha256:fb3eb68e03e4317352032642d3ed18c796c30f5a3bec40caef69cee0b859df5e,1028 - completed: - hackage: jose-jwt-0.10.0@sha256:6ed175a01c721e317ceea15eb251a81de145c03711a977517935633a5cdec1d4,3546 + hackage: jwt-0.11.0@sha256:0602735ee4093c6c5bc918461855bcd55499099363bad34eb7a227aeef3cde29,4265 pantry-tree: - sha256: 58649e68e2d1adb47d8ed8741bd27ac23a2f19e3ee62bc28a68ac8642b3e0858 - size: 1231 + sha256: 0b3155d79cc7d44285762b2012debe8ec70ac377163a8e5f29581bacaf50179e + size: 1029 original: - hackage: jose-jwt-0.10.0 + hackage: jwt-0.11.0@sha256:0602735ee4093c6c5bc918461855bcd55499099363bad34eb7a227aeef3cde29,4265 - completed: - hackage: lens-5.3.3@sha256:b0dad972e401df9ddb8df98c7153f661c077607bfed83b210fd9508ba6f44f8d,14839 + hackage: microlens-pro-0.2.0.5@sha256:8c4afe7a696682dadd042c1e323d43ae7361a443c29b4992984d54b374f254c3,3376 pantry-tree: - sha256: 8cfccd6f020672c602d0902904bb2ed4bd8f2e8ca35564b8d0ceb06a35223461 - size: 8405 + sha256: 6e719bbe246f16168704ed33dc445510e2fedbee309cbf79614376f4aece35c1 + size: 430 original: - hackage: lens-5.3.3 + hackage: microlens-pro-0.2.0.5@sha256:8c4afe7a696682dadd042c1e323d43ae7361a443c29b4992984d54b374f254c3,3376 - completed: - hackage: oidc-client-0.6.1.0@sha256:5829e916a8847e4eef64dd4bfba07d10636dc1f7b554a0d63ca1a09f2dabe448,3359 + hackage: oidc-client-0.8.0.0@sha256:ad04bcb9680c81ca364ed097929265fe79a036b5a2dd556f6ff344146da34afd,3523 pantry-tree: - sha256: 193b18f756abdea389a0ec5cc6c20e621bf74ba3850fdfb895e01a6172fd7988 + sha256: 68b0e27cef8df26f80b46691a4cb5038f73d9368bdb1df17ddfb888203676f05 size: 1298 original: - hackage: oidc-client-0.6.1.0 + hackage: oidc-client-0.8.0.0@sha256:ad04bcb9680c81ca364ed097929265fe79a036b5a2dd556f6ff344146da34afd,3523 - completed: - hackage: raven-haskell-0.1.4.1@sha256:9187272adc064197528645b5ad9b89163b668f386f34016d97fa646d5c790784,1479 + hackage: raven-haskell-0.1.4.1@sha256:c0dbccf85c815cc95bad1ee9332a422b2ad4070f5023818092a9e144e3e0d534,1479 pantry-tree: - sha256: e8f14bfed6b055dc95933257441ba97d3d779cbe08a0e82c3c2dff5d69c8c48f + sha256: db686e4055b93e28b0b9683dc2d7ee4a9b94da444dd5560e2b0e57a9cf489eb3 size: 632 original: - hackage: raven-haskell-0.1.4.1 -- completed: - hackage: servant-swagger-1.2@sha256:db79bf9d08440843aae06780e1d139d374f29317d01276de315236f4c0256d63,4790 - pantry-tree: - sha256: b62e0f004fb32510cd2b4694ab49a06096ad81e6f6d9020fc053a8c67457a4da - size: 1636 - original: - hackage: servant-swagger-1.2 + hackage: raven-haskell-0.1.4.1@sha256:c0dbccf85c815cc95bad1ee9332a422b2ad4070f5023818092a9e144e3e0d534,1479 - completed: hackage: servant-swagger-tags-0.1.0.1@sha256:2d743e9ad1cfcca537acc99e0b97e0e4feda3b5c842937dbf5895261e3105bf1,1094 pantry-tree: sha256: 4329b4e1c1d70304cd19841aa6a56b2b7c7151a2cb9d193ffbfcf800d1f1966e size: 279 original: - hackage: servant-swagger-tags-0.1.0.1 -- completed: - hackage: servant-swagger-ui-0.3.5.5.0.0@sha256:a008f166840f393eebccd634e7abfac0f2df1498713516037dc531607626fcc9,2305 - pantry-tree: - sha256: a025f19ef094aec860ed8928312970fe90da20e543c2617c438ff4d031bf078a - size: 1754 - original: - hackage: servant-swagger-ui-0.3.5.5.0.0 -- completed: - hackage: servant-swagger-ui-core-0.3.5@sha256:61cf59a7e9eb7075f2c7aba0782cdee7caf8f6db156ddada26ae22037e5e8a0f,1771 - pantry-tree: - sha256: 4fa79fccb6193a5ac5c978d3b73fabb459eb6801dc023b54f06462a5f9da2f50 - size: 244 - original: - hackage: servant-swagger-ui-core-0.3.5 + hackage: servant-swagger-tags-0.1.0.1@sha256:2d743e9ad1cfcca537acc99e0b97e0e4feda3b5c842937dbf5895261e3105bf1,1094 - completed: - hackage: swagger2-2.8.8@sha256:f7937b2455112e3fb9399a4e303b616474b11065d3334acdcc197bedafe4c713,4518 + hackage: text-replace-0.1.0.3@sha256:1ac3a6a18f0e7d5274e14b6e03e3b36b953d8f0a24ee6b43f8a8befb4160b6b6,1628 pantry-tree: - sha256: 1148ea39007e0a0c602d5c78ec108f24993cec34aaa15954140fb557ed9daf3a - size: 2192 + sha256: 9d2b3712b7223ab76c50f5e86bdca1431287896af9bd93abc54533a264da1de0 + size: 394 original: - hackage: swagger2-2.8.8 + hackage: text-replace-0.1.0.3@sha256:1ac3a6a18f0e7d5274e14b6e03e3b36b953d8f0a24ee6b43f8a8befb4160b6b6,1628 - completed: - hackage: text-short-0.1.6@sha256:41be94ccd3f6646ab69b0b05c5130ea3c7911a4598ab9b9192f21ad25a69163a,2827 + hackage: time-parsers-0.2@sha256:393d52ebb968035129a90c9dfd56ea3de8e81900e8c26b33dce1b22571a040f2,1911 pantry-tree: - sha256: fde373a157e72b0c4c9c331f2c136a9fd60383c4c85bd8e841cb78f29ad852ed - size: 612 + sha256: 4fb641abf3ca36aa085d5dd142b8b8ef01a034573cd4f0697641ddf7c082de83 + size: 435 original: - hackage: text-short-0.1.6 + hackage: time-parsers-0.2@sha256:393d52ebb968035129a90c9dfd56ea3de8e81900e8c26b33dce1b22571a040f2,1911 - completed: - hackage: text-replace-0.0.0.4@sha256:88800aba160dfb512cf43b24063170d34900e1646ad21f28715a22679f42ae15,1738 + hackage: x509-1.7.7@sha256:90eef2d745a654146fc1c325e035eaddac531e4d2145d4bc1dcf4b8fad439d34,2276 pantry-tree: - sha256: a7d17c85a9637ef9cc6762ea4e9b932191ede485655b5d18d41292cc9475b105 - size: 293 + sha256: d81ffd09633c0417bcedbfc29f870cc843ec0750edd2f73c8fd60a5e5df278d2 + size: 1124 original: - hackage: text-replace-0.0.0.4 + hackage: x509-1.7.7@sha256:90eef2d745a654146fc1c325e035eaddac531e4d2145d4bc1dcf4b8fad439d34,2276 - completed: - hackage: th-compat-0.1.6@sha256:e83d97946f84fe492762ceb3b4753b4770c78b0b70e594078700baa91a5106c2,2885 + hackage: x509-store-1.6.9@sha256:1f1abeab5bacf1407b920d0f34f4c35a5ad450ff0d8121cd3dc76460f81e711d,1716 pantry-tree: - sha256: 05c1425853d7be82b203be8d22a00a0e8e271f0d71e463addf1ba72dd4f5bc9b - size: 530 + sha256: 9fc5a6a997af3569c79d5062534cc9836721b39df86bef56308f209164ab500d + size: 398 original: - hackage: th-compat-0.1.6 + hackage: x509-store-1.6.9@sha256:1f1abeab5bacf1407b920d0f34f4c35a5ad450ff0d8121cd3dc76460f81e711d,1716 - completed: - hackage: time-parsers-0.2@sha256:393d52ebb968035129a90c9dfd56ea3de8e81900e8c26b33dce1b22571a040f2,1911 + hackage: x509-validation-1.6.12@sha256:4f4af20ec77f02c042ecd4726c195bb0e0b694b336de81e7bd4515b2917bd9bc,2169 pantry-tree: - sha256: 4fb641abf3ca36aa085d5dd142b8b8ef01a034573cd4f0697641ddf7c082de83 - size: 435 + sha256: f95c21aa9671b10f9384b89c018874246f68220b63266172b47a747b62695e23 + size: 631 original: - hackage: time-parsers-0.2 + hackage: x509-validation-1.6.12@sha256:4f4af20ec77f02c042ecd4726c195bb0e0b694b336de81e7bd4515b2917bd9bc,2169 snapshots: - completed: - sha256: fb194ea04d72ba9680dc67ce413af055913d48fee1e7e2433e2d36441c19e094 - size: 556051 - url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/nightly/2024/1/10.yaml - original: nightly-2024-01-10 + sha256: 655e468f774beee1badf07dc4c45fb50288d5c66ce7bef6f487b7f92891a90b0 + size: 728965 + url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/24/37.yaml + original: lts-24.37 diff --git a/wizard-public/package.yaml b/wizard-public/package.yaml index 799ac2280..643af20ce 100644 --- a/wizard-public/package.yaml +++ b/wizard-public/package.yaml @@ -1,5 +1,5 @@ name: wizard-public -version: '4.29.0' +version: '4.30.0' synopsis: Wizard Public description: Wizard Public category: Web diff --git a/wizard-public/src/WizardLib/Public/Database/Migration/Development/Tenant/Data/TenantLimitBundles.hs b/wizard-public/src/WizardLib/Public/Database/Migration/Development/Tenant/Data/TenantLimitBundles.hs index 2ad3c5039..1eac9a790 100644 --- a/wizard-public/src/WizardLib/Public/Database/Migration/Development/Tenant/Data/TenantLimitBundles.hs +++ b/wizard-public/src/WizardLib/Public/Database/Migration/Development/Tenant/Data/TenantLimitBundles.hs @@ -14,5 +14,5 @@ tenantLimitBundleChange = , projects = -1000 , documents = -1000 , locales = -1000 - , storage = -1000 * 5 * 1000 * 1000 + , storage = (-1000) * 5 * 1000 * 1000 } diff --git a/wizard-public/src/WizardLib/Public/Database/Migration/Development/Tenant/Data/TenantUsages.hs b/wizard-public/src/WizardLib/Public/Database/Migration/Development/Tenant/Data/TenantUsages.hs index 3cef73bd3..70c74be96 100644 --- a/wizard-public/src/WizardLib/Public/Database/Migration/Development/Tenant/Data/TenantUsages.hs +++ b/wizard-public/src/WizardLib/Public/Database/Migration/Development/Tenant/Data/TenantUsages.hs @@ -52,4 +52,4 @@ defaultUsageLocales :: UsageEntryDTO defaultUsageLocales = UsageEntryDTO {current = 0, max = -1000} defaultUsageStorage :: UsageEntryDTO -defaultUsageStorage = UsageEntryDTO {current = 0, max = -1000 * 5 * 1000 * 1000} +defaultUsageStorage = UsageEntryDTO {current = 0, max = (-1000) * 5 * 1000 * 1000} diff --git a/wizard-public/src/WizardLib/Public/Service/Cache/UserTokenCache.hs b/wizard-public/src/WizardLib/Public/Service/Cache/UserTokenCache.hs index 24108354b..18659a578 100644 --- a/wizard-public/src/WizardLib/Public/Service/Cache/UserTokenCache.hs +++ b/wizard-public/src/WizardLib/Public/Service/Cache/UserTokenCache.hs @@ -143,4 +143,4 @@ getCache getCache = do context <- ask let cache = context.cache' - return $ cache.userToken + return cache.userToken diff --git a/wizard-public/src/WizardLib/Public/Service/User/UserMapper.hs b/wizard-public/src/WizardLib/Public/Service/User/UserMapper.hs index 0c439f756..ee272154f 100644 --- a/wizard-public/src/WizardLib/Public/Service/User/UserMapper.hs +++ b/wizard-public/src/WizardLib/Public/Service/User/UserMapper.hs @@ -10,7 +10,7 @@ toWithMembershipDTO user = { uuid = user.uuid , firstName = user.firstName , lastName = user.lastName - , gravatarHash = createGravatarHash $ user.email + , gravatarHash = createGravatarHash user.email , imageUrl = user.imageUrl , membershipType = user.membershipType } diff --git a/wizard-public/src/WizardLib/Public/Service/UserToken/UserTokenService.hs b/wizard-public/src/WizardLib/Public/Service/UserToken/UserTokenService.hs index e2d046253..7cde467c1 100644 --- a/wizard-public/src/WizardLib/Public/Service/UserToken/UserTokenService.hs +++ b/wizard-public/src/WizardLib/Public/Service/UserToken/UserTokenService.hs @@ -41,7 +41,7 @@ deleteTokensExceptCurrentSession tokenValue = case mIdentityUuid of Just identityUuid -> do userTokens <- findUserTokensByUserUuidAndType identityUuid "LoginUserTokenType" - traverse_ deleteUserTokenByUuid . fmap (.uuid) . filter (\ut -> ut.value /= tokenValue) $ userTokens + traverse_ (deleteUserTokenByUuid . ((.uuid))) . filter (\ut -> ut.value /= tokenValue) $ userTokens Nothing -> throwError $ ForbiddenError _ERROR_SERVICE_USER__MISSING_USER deleteTokenByUuid diff --git a/wizard-public/src/WizardLib/Public/Util/Jinja.hs b/wizard-public/src/WizardLib/Public/Util/Jinja.hs index f936e7ee4..f226a1d3f 100644 --- a/wizard-public/src/WizardLib/Public/Util/Jinja.hs +++ b/wizard-public/src/WizardLib/Public/Util/Jinja.hs @@ -44,8 +44,8 @@ renderJinjaSingle template itemContext = do Right (r : _) -> return $ if r.ok - then Right (r.result) - else Left $ fromMaybe "Unknown rendering error" (r.message) + then Right r.result + else Left $ fromMaybe "Unknown rendering error" r.message _ -> return $ Left "No results returned from Jinja rendering" renderJinjaMultiple :: [String] -> Value -> IO [Either String String] @@ -58,8 +58,8 @@ renderJinjaMultiple templates itemContext = do where processResult r = if r.ok - then Right (r.result) - else Left $ fromMaybe "Unknown rendering error" (r.message) + then Right r.result + else Left $ fromMaybe "Unknown rendering error" r.message renderJinjaBatch :: String -> [Value] -> IO [Either String String] renderJinjaBatch template itemContexts = do @@ -71,8 +71,8 @@ renderJinjaBatch template itemContexts = do where processResult r = if r.ok - then Right (r.result) - else Left $ fromMaybe "Unknown rendering error" (r.message) + then Right r.result + else Left $ fromMaybe "Unknown rendering error" r.message renderJinja' :: JinjaInput -> IO (Either String [JinjaResult]) renderJinja' inputStructure = do diff --git a/wizard-server/Dockerfile b/wizard-server/Dockerfile index 0cd77cbc9..713d142a8 100644 --- a/wizard-server/Dockerfile +++ b/wizard-server/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:22.04 +FROM ubuntu:24.04 WORKDIR /app diff --git a/wizard-server/package.yaml b/wizard-server/package.yaml index 77b388934..f2ff774ab 100644 --- a/wizard-server/package.yaml +++ b/wizard-server/package.yaml @@ -1,5 +1,5 @@ name: wizard-server -version: '4.29.0' +version: '4.30.0' synopsis: Engine Wizard description: Engine Wizard category: Web diff --git a/wizard-server/src/Wizard/Api/Handler/ApiKey/Api.hs b/wizard-server/src/Wizard/Api/Handler/ApiKey/Api.hs index 7096f0a97..27e0843a2 100644 --- a/wizard-server/src/Wizard/Api/Handler/ApiKey/Api.hs +++ b/wizard-server/src/Wizard/Api/Handler/ApiKey/Api.hs @@ -11,8 +11,8 @@ import Wizard.Model.Context.BaseContext type ApiKeyAPI = Tags "ApiKey" :> ( List_GET - :<|> List_POST - :<|> Detail_DELETE + :<|> List_POST + :<|> Detail_DELETE ) apiKeyApi :: Proxy ApiKeyAPI diff --git a/wizard-server/src/Wizard/Api/Handler/AppKey/Api.hs b/wizard-server/src/Wizard/Api/Handler/AppKey/Api.hs index 0c73ba492..60b96a2a1 100644 --- a/wizard-server/src/Wizard/Api/Handler/AppKey/Api.hs +++ b/wizard-server/src/Wizard/Api/Handler/AppKey/Api.hs @@ -11,8 +11,8 @@ import Wizard.Model.Context.BaseContext type AppKeyAPI = Tags "AppKey" :> ( List_GET - :<|> List_POST - :<|> Detail_DELETE + :<|> List_POST + :<|> Detail_DELETE ) appKeyApi :: Proxy AppKeyAPI diff --git a/wizard-server/src/Wizard/Api/Handler/Auth/Api.hs b/wizard-server/src/Wizard/Api/Handler/Auth/Api.hs index 6ce352556..9a7a8dc9d 100644 --- a/wizard-server/src/Wizard/Api/Handler/Auth/Api.hs +++ b/wizard-server/src/Wizard/Api/Handler/Auth/Api.hs @@ -12,9 +12,9 @@ import Wizard.Model.Context.BaseContext type AuthAPI = Tags "Auth" :> ( Detail_GET - :<|> Detail_Callback_GET - :<|> Detail_Consents_POST - :<|> Detail_Logout_GET + :<|> Detail_Callback_GET + :<|> Detail_Consents_POST + :<|> Detail_Logout_GET ) authApi :: Proxy AuthAPI diff --git a/wizard-server/src/Wizard/Api/Handler/Dev/Operation/Api.hs b/wizard-server/src/Wizard/Api/Handler/Dev/Operation/Api.hs index 2acefb0eb..1e4914fa8 100644 --- a/wizard-server/src/Wizard/Api/Handler/Dev/Operation/Api.hs +++ b/wizard-server/src/Wizard/Api/Handler/Dev/Operation/Api.hs @@ -10,7 +10,7 @@ import Wizard.Model.Context.BaseContext type DevOperationAPI = Tags "Dev Operation" :> ( List_GET - :<|> List_Executions_POST + :<|> List_Executions_POST ) devOperationApi :: Proxy DevOperationAPI diff --git a/wizard-server/src/Wizard/Api/Handler/Document/Api.hs b/wizard-server/src/Wizard/Api/Handler/Document/Api.hs index cf1f2536e..73fb1931c 100644 --- a/wizard-server/src/Wizard/Api/Handler/Document/Api.hs +++ b/wizard-server/src/Wizard/Api/Handler/Document/Api.hs @@ -13,10 +13,10 @@ import Wizard.Model.Context.BaseContext type DocumentAPI = Tags "Document" :> ( List_GET - :<|> List_POST - :<|> Detail_DELETE - :<|> Detail_Download_GET - :<|> Detail_Available_Submission_Services_GET + :<|> List_POST + :<|> Detail_DELETE + :<|> Detail_Download_GET + :<|> Detail_Available_Submission_Services_GET ) documentApi :: Proxy DocumentAPI diff --git a/wizard-server/src/Wizard/Api/Handler/DocumentTemplate/Api.hs b/wizard-server/src/Wizard/Api/Handler/DocumentTemplate/Api.hs index f5e654d52..21fa477cb 100644 --- a/wizard-server/src/Wizard/Api/Handler/DocumentTemplate/Api.hs +++ b/wizard-server/src/Wizard/Api/Handler/DocumentTemplate/Api.hs @@ -18,15 +18,15 @@ import Wizard.Model.Context.BaseContext type DocumentTemplateAPI = Tags "Document Template" :> ( List_GET - :<|> List_All_GET - :<|> List_Suggestions_GET - :<|> List_DELETE - :<|> Detail_GET - :<|> Detail_PUT - :<|> Detail_DELETE - :<|> List_Bundle_POST - :<|> Detail_Bundle_GET - :<|> Detail_Pull_POST + :<|> List_All_GET + :<|> List_Suggestions_GET + :<|> List_DELETE + :<|> Detail_GET + :<|> Detail_PUT + :<|> Detail_DELETE + :<|> List_Bundle_POST + :<|> Detail_Bundle_GET + :<|> Detail_Pull_POST ) documentTemplateApi :: Proxy DocumentTemplateAPI diff --git a/wizard-server/src/Wizard/Api/Handler/DocumentTemplateDraft/Api.hs b/wizard-server/src/Wizard/Api/Handler/DocumentTemplateDraft/Api.hs index bc4995f9a..e9b21587a 100644 --- a/wizard-server/src/Wizard/Api/Handler/DocumentTemplateDraft/Api.hs +++ b/wizard-server/src/Wizard/Api/Handler/DocumentTemplateDraft/Api.hs @@ -15,12 +15,12 @@ import Wizard.Model.Context.BaseContext type DocumentTemplateDraftAPI = Tags "Document Template Draft" :> ( List_GET - :<|> List_POST - :<|> Detail_GET - :<|> Detail_PUT - :<|> Detail_DELETE - :<|> Detail_Documents_Preview_GET - :<|> Detail_Documents_Preview_Settings_PUT + :<|> List_POST + :<|> Detail_GET + :<|> Detail_PUT + :<|> Detail_DELETE + :<|> Detail_Documents_Preview_GET + :<|> Detail_Documents_Preview_Settings_PUT ) documentTemplateDraftApi :: Proxy DocumentTemplateDraftAPI diff --git a/wizard-server/src/Wizard/Api/Handler/DocumentTemplateDraft/Asset/Api.hs b/wizard-server/src/Wizard/Api/Handler/DocumentTemplateDraft/Asset/Api.hs index 803128cbe..dca23458e 100644 --- a/wizard-server/src/Wizard/Api/Handler/DocumentTemplateDraft/Asset/Api.hs +++ b/wizard-server/src/Wizard/Api/Handler/DocumentTemplateDraft/Asset/Api.hs @@ -15,12 +15,12 @@ import Wizard.Model.Context.BaseContext type DocumentTemplateAssetAPI = Tags "Document Template Draft Asset" :> ( List_GET - :<|> List_POST - :<|> Detail_GET - :<|> Detail_PUT - :<|> Detail_DELETE - :<|> Detail_Content_GET - :<|> Detail_Content_PUT + :<|> List_POST + :<|> Detail_GET + :<|> Detail_PUT + :<|> Detail_DELETE + :<|> Detail_Content_GET + :<|> Detail_Content_PUT ) documentTemplateAssetApi :: Proxy DocumentTemplateAssetAPI diff --git a/wizard-server/src/Wizard/Api/Handler/DocumentTemplateDraft/Detail_Documents_Preview_GET.hs b/wizard-server/src/Wizard/Api/Handler/DocumentTemplateDraft/Detail_Documents_Preview_GET.hs index b8b3f6d38..8736b4eba 100644 --- a/wizard-server/src/Wizard/Api/Handler/DocumentTemplateDraft/Detail_Documents_Preview_GET.hs +++ b/wizard-server/src/Wizard/Api/Handler/DocumentTemplateDraft/Detail_Documents_Preview_GET.hs @@ -35,5 +35,5 @@ detail_documents_preview_GET mTokenHeader mServerUrl uuid = case doc.state of DoneDocumentState -> addTraceUuidHeader fileDto ErrorDocumentState -> - throwError $ SystemLogError (_ERROR_SERVICE_PROJECT__UNABLE_TO_GENERATE_DOCUMENT_PREVIEW $ doc.workerLog) + throwError $ SystemLogError (_ERROR_SERVICE_PROJECT__UNABLE_TO_GENERATE_DOCUMENT_PREVIEW doc.workerLog) _ -> throwError AcceptedError diff --git a/wizard-server/src/Wizard/Api/Handler/DocumentTemplateDraft/File/Api.hs b/wizard-server/src/Wizard/Api/Handler/DocumentTemplateDraft/File/Api.hs index 21121608c..c1cd18b38 100644 --- a/wizard-server/src/Wizard/Api/Handler/DocumentTemplateDraft/File/Api.hs +++ b/wizard-server/src/Wizard/Api/Handler/DocumentTemplateDraft/File/Api.hs @@ -15,12 +15,12 @@ import Wizard.Model.Context.BaseContext type DocumentTemplateFileAPI = Tags "Document Template Draft File" :> ( List_GET - :<|> List_POST - :<|> Detail_GET - :<|> Detail_PUT - :<|> Detail_DELETE - :<|> Detail_Content_GET - :<|> Detail_Content_PUT + :<|> List_POST + :<|> Detail_GET + :<|> Detail_PUT + :<|> Detail_DELETE + :<|> Detail_Content_GET + :<|> Detail_Content_PUT ) documentTemplateFileApi :: Proxy DocumentTemplateFileAPI diff --git a/wizard-server/src/Wizard/Api/Handler/DocumentTemplateDraft/Folder/Api.hs b/wizard-server/src/Wizard/Api/Handler/DocumentTemplateDraft/Folder/Api.hs index fe4da3453..f0b5fe103 100644 --- a/wizard-server/src/Wizard/Api/Handler/DocumentTemplateDraft/Folder/Api.hs +++ b/wizard-server/src/Wizard/Api/Handler/DocumentTemplateDraft/Folder/Api.hs @@ -10,7 +10,7 @@ import Wizard.Model.Context.BaseContext type DocumentTemplateFolderAPI = Tags "Document Template Draft Folder" :> ( List_Delete_POST - :<|> List_Move_POST + :<|> List_Move_POST ) documentTemplateFolderApi :: Proxy DocumentTemplateFolderAPI diff --git a/wizard-server/src/Wizard/Api/Handler/Feedback/Api.hs b/wizard-server/src/Wizard/Api/Handler/Feedback/Api.hs index 46edfb179..57ed0688b 100644 --- a/wizard-server/src/Wizard/Api/Handler/Feedback/Api.hs +++ b/wizard-server/src/Wizard/Api/Handler/Feedback/Api.hs @@ -11,8 +11,8 @@ import Wizard.Model.Context.BaseContext type FeedbackAPI = Tags "Feedback" :> ( List_GET - :<|> List_POST - :<|> Detail_GET + :<|> List_POST + :<|> Detail_GET ) feedbackApi :: Proxy FeedbackAPI diff --git a/wizard-server/src/Wizard/Api/Handler/KnowledgeModelEditor/Api.hs b/wizard-server/src/Wizard/Api/Handler/KnowledgeModelEditor/Api.hs index f900bdf7b..6ba7f4d14 100644 --- a/wizard-server/src/Wizard/Api/Handler/KnowledgeModelEditor/Api.hs +++ b/wizard-server/src/Wizard/Api/Handler/KnowledgeModelEditor/Api.hs @@ -16,13 +16,13 @@ import Wizard.Model.Context.BaseContext type KnowledgeModelEditorAPI = Tags "Knowledge Model Editor" :> ( List_GET - :<|> List_Suggestions_GET - :<|> List_POST - :<|> Detail_GET - :<|> Detail_PUT - :<|> Detail_DELETE - :<|> Detail_WS - :<|> MigrationAPI + :<|> List_Suggestions_GET + :<|> List_POST + :<|> Detail_GET + :<|> Detail_PUT + :<|> Detail_DELETE + :<|> Detail_WS + :<|> MigrationAPI ) knowledgeModelEditorApi :: Proxy KnowledgeModelEditorAPI diff --git a/wizard-server/src/Wizard/Api/Handler/KnowledgeModelEditor/Migration/Api.hs b/wizard-server/src/Wizard/Api/Handler/KnowledgeModelEditor/Migration/Api.hs index ef999409f..758902891 100644 --- a/wizard-server/src/Wizard/Api/Handler/KnowledgeModelEditor/Migration/Api.hs +++ b/wizard-server/src/Wizard/Api/Handler/KnowledgeModelEditor/Migration/Api.hs @@ -13,10 +13,10 @@ import Wizard.Model.Context.BaseContext type MigrationAPI = Tags "Knowledge Model Editor Migration" :> ( List_Current_GET - :<|> List_Current_POST - :<|> List_Current_DELETE - :<|> List_Current_Conflict_POST - :<|> List_Current_Conflict_All_POST + :<|> List_Current_POST + :<|> List_Current_DELETE + :<|> List_Current_Conflict_POST + :<|> List_Current_Conflict_All_POST ) migrationApi :: Proxy MigrationAPI diff --git a/wizard-server/src/Wizard/Api/Handler/KnowledgeModelPackage/Api.hs b/wizard-server/src/Wizard/Api/Handler/KnowledgeModelPackage/Api.hs index b62839e0a..6d307be0d 100644 --- a/wizard-server/src/Wizard/Api/Handler/KnowledgeModelPackage/Api.hs +++ b/wizard-server/src/Wizard/Api/Handler/KnowledgeModelPackage/Api.hs @@ -20,17 +20,17 @@ import Wizard.Model.Context.BaseContext type KnowledgeModelPackageAPI = Tags "Knowledge Model Package" :> ( List_GET - :<|> List_Suggestions_GET - :<|> List_POST - :<|> Detail_GET - :<|> Detail_PUT - :<|> Detail_DELETE - :<|> List_Bundle_POST - :<|> List_From_Editor_POST - :<|> List_From_Migration_POST - :<|> Detail_Bundle_GET - :<|> Detail_Pull_POST - :<|> DependentAPI + :<|> List_Suggestions_GET + :<|> List_POST + :<|> Detail_GET + :<|> Detail_PUT + :<|> Detail_DELETE + :<|> List_Bundle_POST + :<|> List_From_Editor_POST + :<|> List_From_Migration_POST + :<|> Detail_Bundle_GET + :<|> Detail_Pull_POST + :<|> DependentAPI ) knowledgeModelPackageApi :: Proxy KnowledgeModelPackageAPI diff --git a/wizard-server/src/Wizard/Api/Handler/KnowledgeModelSecret/Api.hs b/wizard-server/src/Wizard/Api/Handler/KnowledgeModelSecret/Api.hs index 70d8c54d5..a3e550c20 100644 --- a/wizard-server/src/Wizard/Api/Handler/KnowledgeModelSecret/Api.hs +++ b/wizard-server/src/Wizard/Api/Handler/KnowledgeModelSecret/Api.hs @@ -12,9 +12,9 @@ import Wizard.Model.Context.BaseContext type KnowledgeModelSecretAPI = Tags "KnowledgeModelSecret" :> ( List_GET - :<|> List_POST - :<|> Detail_PUT - :<|> Detail_DELETE + :<|> List_POST + :<|> Detail_PUT + :<|> Detail_DELETE ) knowledgeModelSecretApi :: Proxy KnowledgeModelSecretAPI diff --git a/wizard-server/src/Wizard/Api/Handler/Locale/Api.hs b/wizard-server/src/Wizard/Api/Handler/Locale/Api.hs index 123b1cbb2..d0a70393f 100644 --- a/wizard-server/src/Wizard/Api/Handler/Locale/Api.hs +++ b/wizard-server/src/Wizard/Api/Handler/Locale/Api.hs @@ -19,16 +19,16 @@ import Wizard.Model.Context.BaseContext type LocaleAPI = Tags "Locale" :> ( List_GET - :<|> List_Suggestions_GET - :<|> List_Current_Content_GET - :<|> List_POST - :<|> List_DELETE - :<|> List_Bundle_POST - :<|> Detail_GET - :<|> Detail_PUT - :<|> Detail_Bundle_GET - :<|> Detail_DELETE - :<|> Detail_Pull_POST + :<|> List_Suggestions_GET + :<|> List_Current_Content_GET + :<|> List_POST + :<|> List_DELETE + :<|> List_Bundle_POST + :<|> Detail_GET + :<|> Detail_PUT + :<|> Detail_Bundle_GET + :<|> Detail_DELETE + :<|> Detail_Pull_POST ) localeApi :: Proxy LocaleAPI diff --git a/wizard-server/src/Wizard/Api/Handler/PersistentCommand/Api.hs b/wizard-server/src/Wizard/Api/Handler/PersistentCommand/Api.hs index fa4dae411..0fe4cfbf9 100644 --- a/wizard-server/src/Wizard/Api/Handler/PersistentCommand/Api.hs +++ b/wizard-server/src/Wizard/Api/Handler/PersistentCommand/Api.hs @@ -14,11 +14,11 @@ import Wizard.Model.Context.BaseContext type PersistentCommandAPI = Tags "Persistent Command" :> ( List_GET - :<|> List_POST - :<|> List_Attempts_POST - :<|> Detail_GET - :<|> Detail_PUT - :<|> Detail_Attempts_POST + :<|> List_POST + :<|> List_Attempts_POST + :<|> Detail_GET + :<|> Detail_PUT + :<|> Detail_Attempts_POST ) persistentCommandApi :: Proxy PersistentCommandAPI diff --git a/wizard-server/src/Wizard/Api/Handler/Project/Api.hs b/wizard-server/src/Wizard/Api/Handler/Project/Api.hs index ac4c8a2b1..ae6b74e57 100644 --- a/wizard-server/src/Wizard/Api/Handler/Project/Api.hs +++ b/wizard-server/src/Wizard/Api/Handler/Project/Api.hs @@ -33,30 +33,30 @@ import Wizard.Model.Context.BaseContext type ProjectAPI = Tags "Project" :> ( List_GET - :<|> List_POST - :<|> List_POST_FromTemplate - :<|> List_POST_CloneUuid - :<|> Detail_GET - :<|> Detail_Questionnaire_GET - :<|> Detail_Preview_GET - :<|> Detail_Settings_GET - :<|> Detail_Settings_PUT - :<|> Detail_Share_PUT - :<|> Detail_DELETE - :<|> Detail_Content_PUT - :<|> Detail_Report_GET - :<|> Detail_Documents_GET - :<|> Detail_Documents_Preview_GET - :<|> Detail_WS - :<|> Detail_Revert_POST - :<|> Detail_Revert_Preview_POST - :<|> CommentAPI - :<|> EventAPI - :<|> FileAPI - :<|> MigrationAPI - :<|> TagAPI - :<|> UserAPI - :<|> VersionAPI + :<|> List_POST + :<|> List_POST_FromTemplate + :<|> List_POST_CloneUuid + :<|> Detail_GET + :<|> Detail_Questionnaire_GET + :<|> Detail_Preview_GET + :<|> Detail_Settings_GET + :<|> Detail_Settings_PUT + :<|> Detail_Share_PUT + :<|> Detail_DELETE + :<|> Detail_Content_PUT + :<|> Detail_Report_GET + :<|> Detail_Documents_GET + :<|> Detail_Documents_Preview_GET + :<|> Detail_WS + :<|> Detail_Revert_POST + :<|> Detail_Revert_Preview_POST + :<|> CommentAPI + :<|> EventAPI + :<|> FileAPI + :<|> MigrationAPI + :<|> TagAPI + :<|> UserAPI + :<|> VersionAPI ) projectApi :: Proxy ProjectAPI diff --git a/wizard-server/src/Wizard/Api/Handler/Project/Detail_Documents_Preview_GET.hs b/wizard-server/src/Wizard/Api/Handler/Project/Detail_Documents_Preview_GET.hs index 081adc72e..c2dfbf55c 100644 --- a/wizard-server/src/Wizard/Api/Handler/Project/Detail_Documents_Preview_GET.hs +++ b/wizard-server/src/Wizard/Api/Handler/Project/Detail_Documents_Preview_GET.hs @@ -35,5 +35,5 @@ detail_documents_preview_GET mTokenHeader mServerUrl uuid = case doc.state of DoneDocumentState -> addTraceUuidHeader fileDto ErrorDocumentState -> - throwError $ SystemLogError (_ERROR_SERVICE_PROJECT__UNABLE_TO_GENERATE_DOCUMENT_PREVIEW $ doc.workerLog) + throwError $ SystemLogError (_ERROR_SERVICE_PROJECT__UNABLE_TO_GENERATE_DOCUMENT_PREVIEW doc.workerLog) _ -> throwError AcceptedError diff --git a/wizard-server/src/Wizard/Api/Handler/Project/Event/Api.hs b/wizard-server/src/Wizard/Api/Handler/Project/Event/Api.hs index 7179ce1f5..c38c1b9fd 100644 --- a/wizard-server/src/Wizard/Api/Handler/Project/Event/Api.hs +++ b/wizard-server/src/Wizard/Api/Handler/Project/Event/Api.hs @@ -11,8 +11,8 @@ import Wizard.Model.Context.BaseContext type EventAPI = Tags "Project Event" :> ( List_GET - :<|> List_POST - :<|> Detail_GET + :<|> List_POST + :<|> Detail_GET ) eventApi :: Proxy EventAPI diff --git a/wizard-server/src/Wizard/Api/Handler/Project/File/Api.hs b/wizard-server/src/Wizard/Api/Handler/Project/File/Api.hs index af907cc45..ec9048363 100644 --- a/wizard-server/src/Wizard/Api/Handler/Project/File/Api.hs +++ b/wizard-server/src/Wizard/Api/Handler/Project/File/Api.hs @@ -12,9 +12,9 @@ import Wizard.Model.Context.BaseContext type FileAPI = Tags "Project File" :> ( List_GET - :<|> List_POST - :<|> Detail_DELETE - :<|> Detail_Download_GET + :<|> List_POST + :<|> Detail_DELETE + :<|> Detail_Download_GET ) fileApi :: Proxy FileAPI diff --git a/wizard-server/src/Wizard/Api/Handler/Project/Migration/Api.hs b/wizard-server/src/Wizard/Api/Handler/Project/Migration/Api.hs index 7d1a807d7..465a7b7c5 100644 --- a/wizard-server/src/Wizard/Api/Handler/Project/Migration/Api.hs +++ b/wizard-server/src/Wizard/Api/Handler/Project/Migration/Api.hs @@ -13,10 +13,10 @@ import Wizard.Model.Context.BaseContext type MigrationAPI = Tags "Project Migration" :> ( List_POST - :<|> List_Current_GET - :<|> List_Current_PUT - :<|> List_Current_DELETE - :<|> List_Current_Completion_POST + :<|> List_Current_GET + :<|> List_Current_PUT + :<|> List_Current_DELETE + :<|> List_Current_Completion_POST ) migrationApi :: Proxy MigrationAPI diff --git a/wizard-server/src/Wizard/Api/Handler/Project/Version/Api.hs b/wizard-server/src/Wizard/Api/Handler/Project/Version/Api.hs index 3b50e6d41..ddc724f28 100644 --- a/wizard-server/src/Wizard/Api/Handler/Project/Version/Api.hs +++ b/wizard-server/src/Wizard/Api/Handler/Project/Version/Api.hs @@ -12,9 +12,9 @@ import Wizard.Model.Context.BaseContext type VersionAPI = Tags "Project Version" :> ( List_GET - :<|> List_POST - :<|> Detail_PUT - :<|> Detail_DELETE + :<|> List_POST + :<|> Detail_PUT + :<|> Detail_DELETE ) versionApi :: Proxy VersionAPI diff --git a/wizard-server/src/Wizard/Api/Handler/Registry/Api.hs b/wizard-server/src/Wizard/Api/Handler/Registry/Api.hs index 85caafa20..ea5daf985 100644 --- a/wizard-server/src/Wizard/Api/Handler/Registry/Api.hs +++ b/wizard-server/src/Wizard/Api/Handler/Registry/Api.hs @@ -10,7 +10,7 @@ import Wizard.Model.Context.BaseContext type RegistryAPI = Tags "Registry" :> ( List_Signup_POST - :<|> List_Confirmation_POST + :<|> List_Confirmation_POST ) registryApi :: Proxy RegistryAPI diff --git a/wizard-server/src/Wizard/Api/Handler/Submission/Api.hs b/wizard-server/src/Wizard/Api/Handler/Submission/Api.hs index d864b8d20..c79c4e57f 100644 --- a/wizard-server/src/Wizard/Api/Handler/Submission/Api.hs +++ b/wizard-server/src/Wizard/Api/Handler/Submission/Api.hs @@ -10,7 +10,7 @@ import Wizard.Model.Context.BaseContext type SubmissionAPI = Tags "Document Submission" :> ( List_GET - :<|> List_POST + :<|> List_POST ) submissionApi :: Proxy SubmissionAPI diff --git a/wizard-server/src/Wizard/Api/Handler/Swagger/Api.hs b/wizard-server/src/Wizard/Api/Handler/Swagger/Api.hs index 1741fe1c0..7e19693ac 100644 --- a/wizard-server/src/Wizard/Api/Handler/Swagger/Api.hs +++ b/wizard-server/src/Wizard/Api/Handler/Swagger/Api.hs @@ -148,7 +148,7 @@ swagger = s._swaggerInfo { _infoTitle = "Wizard API" , _infoDescription = Just "API specification for Wizard" - , _infoVersion = "4.29.0" + , _infoVersion = "4.30.0" , _infoLicense = Just $ License diff --git a/wizard-server/src/Wizard/Api/Handler/Tenant/Api.hs b/wizard-server/src/Wizard/Api/Handler/Tenant/Api.hs index d444a603e..b21fbd509 100644 --- a/wizard-server/src/Wizard/Api/Handler/Tenant/Api.hs +++ b/wizard-server/src/Wizard/Api/Handler/Tenant/Api.hs @@ -18,15 +18,15 @@ import Wizard.Model.Context.BaseContext type TenantAPI = Tags "Tenant" :> ( List_GET - :<|> List_Suggestions_GET - :<|> List_POST - :<|> Detail_GET - :<|> Detail_PUT - :<|> Detail_DELETE - :<|> TenantConfigAPI - :<|> TenantLimitAPI - :<|> TenantPluginSettingsAPI - :<|> TenantUsageAPI + :<|> List_Suggestions_GET + :<|> List_POST + :<|> Detail_GET + :<|> Detail_PUT + :<|> Detail_DELETE + :<|> TenantConfigAPI + :<|> TenantLimitAPI + :<|> TenantPluginSettingsAPI + :<|> TenantUsageAPI ) tenantApi :: Proxy TenantAPI diff --git a/wizard-server/src/Wizard/Api/Handler/Tenant/Config/Api.hs b/wizard-server/src/Wizard/Api/Handler/Tenant/Config/Api.hs index ff17d09f5..63fc24ad4 100644 --- a/wizard-server/src/Wizard/Api/Handler/Tenant/Config/Api.hs +++ b/wizard-server/src/Wizard/Api/Handler/Tenant/Config/Api.hs @@ -10,7 +10,7 @@ import Wizard.Model.Context.BaseContext type TenantConfigAPI = Tags "Tenant Config" :> ( List_GET - :<|> List_PUT + :<|> List_PUT ) tenantConfigApi :: Proxy TenantConfigAPI diff --git a/wizard-server/src/Wizard/Api/Handler/Tenant/PluginSettings/Api.hs b/wizard-server/src/Wizard/Api/Handler/Tenant/PluginSettings/Api.hs index 7518170f0..247726ab8 100644 --- a/wizard-server/src/Wizard/Api/Handler/Tenant/PluginSettings/Api.hs +++ b/wizard-server/src/Wizard/Api/Handler/Tenant/PluginSettings/Api.hs @@ -11,8 +11,8 @@ import Wizard.Model.Context.BaseContext type TenantPluginSettingsAPI = Tags "Tenant Plugin Settings" :> ( List_PUT - :<|> Detail_GET - :<|> Detail_PUT + :<|> Detail_GET + :<|> Detail_PUT ) tenantPluginSettingsApi :: Proxy TenantPluginSettingsAPI diff --git a/wizard-server/src/Wizard/Api/Handler/Tenant/Usage/Api.hs b/wizard-server/src/Wizard/Api/Handler/Tenant/Usage/Api.hs index c4baef1ec..655149d0b 100644 --- a/wizard-server/src/Wizard/Api/Handler/Tenant/Usage/Api.hs +++ b/wizard-server/src/Wizard/Api/Handler/Tenant/Usage/Api.hs @@ -10,7 +10,7 @@ import Wizard.Model.Context.BaseContext type TenantUsageAPI = Tags "Tenant Usage" :> ( Current_Wizard_GET - :<|> Detail_Wizard_GET + :<|> Detail_Wizard_GET ) tenantUsageApi :: Proxy TenantUsageAPI diff --git a/wizard-server/src/Wizard/Api/Handler/Token/Api.hs b/wizard-server/src/Wizard/Api/Handler/Token/Api.hs index 59fa2dbce..2cb1dacc2 100644 --- a/wizard-server/src/Wizard/Api/Handler/Token/Api.hs +++ b/wizard-server/src/Wizard/Api/Handler/Token/Api.hs @@ -14,11 +14,11 @@ import Wizard.Model.Context.BaseContext type TokenAPI = Tags "Token" :> ( List_GET - :<|> List_POST - :<|> List_DELETE - :<|> List_System_POST - :<|> List_Current_DELETE - :<|> Detail_DELETE + :<|> List_POST + :<|> List_DELETE + :<|> List_System_POST + :<|> List_Current_DELETE + :<|> Detail_DELETE ) tokenApi :: Proxy TokenAPI diff --git a/wizard-server/src/Wizard/Api/Handler/TypeHint/Api.hs b/wizard-server/src/Wizard/Api/Handler/TypeHint/Api.hs index 719b4eba1..26891f079 100644 --- a/wizard-server/src/Wizard/Api/Handler/TypeHint/Api.hs +++ b/wizard-server/src/Wizard/Api/Handler/TypeHint/Api.hs @@ -10,7 +10,7 @@ import Wizard.Model.Context.BaseContext type TypeHintAPI = Tags "TypeHint" :> ( List_POST - :<|> Test_POST + :<|> Test_POST ) typeHintApi :: Proxy TypeHintAPI diff --git a/wizard-server/src/Wizard/Api/Handler/User/Api.hs b/wizard-server/src/Wizard/Api/Handler/User/Api.hs index 74a9abb5b..7e812fedc 100644 --- a/wizard-server/src/Wizard/Api/Handler/User/Api.hs +++ b/wizard-server/src/Wizard/Api/Handler/User/Api.hs @@ -26,23 +26,23 @@ import Wizard.Model.Context.BaseContext type UserAPI = Tags "User" :> ( List_GET - :<|> List_Suggestions_GET - :<|> List_POST - :<|> List_Current_GET - :<|> List_Current_PUT - :<|> List_Current_Submission_Props_GET - :<|> List_Current_Submission_Props_PUT - :<|> List_Current_Password_PUT - :<|> List_Current_Locale_GET - :<|> List_Current_Locale_PUT - :<|> Detail_GET - :<|> Detail_PUT - :<|> Detail_Password_PUT - :<|> Detail_State_PUT - :<|> Detail_DELETE - :<|> NewsAPI - :<|> PluginSettingsAPI - :<|> TourAPI + :<|> List_Suggestions_GET + :<|> List_POST + :<|> List_Current_GET + :<|> List_Current_PUT + :<|> List_Current_Submission_Props_GET + :<|> List_Current_Submission_Props_PUT + :<|> List_Current_Password_PUT + :<|> List_Current_Locale_GET + :<|> List_Current_Locale_PUT + :<|> Detail_GET + :<|> Detail_PUT + :<|> Detail_Password_PUT + :<|> Detail_State_PUT + :<|> Detail_DELETE + :<|> NewsAPI + :<|> PluginSettingsAPI + :<|> TourAPI ) userApi :: Proxy UserAPI diff --git a/wizard-server/src/Wizard/Api/Handler/User/PluginSettings/Api.hs b/wizard-server/src/Wizard/Api/Handler/User/PluginSettings/Api.hs index 79fc035c3..dee282da7 100644 --- a/wizard-server/src/Wizard/Api/Handler/User/PluginSettings/Api.hs +++ b/wizard-server/src/Wizard/Api/Handler/User/PluginSettings/Api.hs @@ -10,7 +10,7 @@ import Wizard.Model.Context.BaseContext type PluginSettingsAPI = Tags "User Plugin Settings" :> ( Detail_GET - :<|> Detail_PUT + :<|> Detail_PUT ) pluginSettingsApi :: Proxy PluginSettingsAPI diff --git a/wizard-server/src/Wizard/Api/Handler/User/Tour/Api.hs b/wizard-server/src/Wizard/Api/Handler/User/Tour/Api.hs index 8ccd7f9e7..6c5c9afde 100644 --- a/wizard-server/src/Wizard/Api/Handler/User/Tour/Api.hs +++ b/wizard-server/src/Wizard/Api/Handler/User/Tour/Api.hs @@ -10,7 +10,7 @@ import Wizard.Model.Context.BaseContext type TourAPI = Tags "User Tour" :> ( List_DELETE - :<|> Detail_PUT + :<|> Detail_PUT ) tourApi :: Proxy TourAPI diff --git a/wizard-server/src/Wizard/Api/Handler/UserGroup/Api.hs b/wizard-server/src/Wizard/Api/Handler/UserGroup/Api.hs index 49594766c..8e59a83f3 100644 --- a/wizard-server/src/Wizard/Api/Handler/UserGroup/Api.hs +++ b/wizard-server/src/Wizard/Api/Handler/UserGroup/Api.hs @@ -10,7 +10,7 @@ import Wizard.Model.Context.BaseContext type UserGroupAPI = Tags "User Group" :> ( List_Suggestions_GET - :<|> Detail_GET + :<|> Detail_GET ) userGroupApi :: Proxy UserGroupAPI diff --git a/wizard-server/src/Wizard/Api/Resource/Project/ProjectReplySM.hs b/wizard-server/src/Wizard/Api/Resource/Project/ProjectReplySM.hs index 7633ec2ea..c5a598641 100644 --- a/wizard-server/src/Wizard/Api/Resource/Project/ProjectReplySM.hs +++ b/wizard-server/src/Wizard/Api/Resource/Project/ProjectReplySM.hs @@ -13,7 +13,7 @@ instance ToSchema Reply where declareNamedSchema = toSwagger (fst rQ1Updated) instance ToSchema ReplyValue where - declareNamedSchema = toSwagger ((snd rQ1).value) + declareNamedSchema = toSwagger (snd rQ1).value instance ToSchema IntegrationReplyType where declareNamedSchema = toSwagger r9IntType diff --git a/wizard-server/src/Wizard/Cache/KnowledgeModelEditorWebsocketCache.hs b/wizard-server/src/Wizard/Cache/KnowledgeModelEditorWebsocketCache.hs index 6b5cc27c4..668da68bf 100644 --- a/wizard-server/src/Wizard/Cache/KnowledgeModelEditorWebsocketCache.hs +++ b/wizard-server/src/Wizard/Cache/KnowledgeModelEditorWebsocketCache.hs @@ -80,4 +80,4 @@ countCache = do getCache :: AppContextM (C.Cache Int WebsocketRecord) getCache = do cache <- asks cache - return $ cache.knowledgeModelEditorWebsocket + return cache.knowledgeModelEditorWebsocket diff --git a/wizard-server/src/Wizard/Cache/ProjectWebsocketCache.hs b/wizard-server/src/Wizard/Cache/ProjectWebsocketCache.hs index e5b3108e2..c49194786 100644 --- a/wizard-server/src/Wizard/Cache/ProjectWebsocketCache.hs +++ b/wizard-server/src/Wizard/Cache/ProjectWebsocketCache.hs @@ -80,4 +80,4 @@ countCache = do getCache :: AppContextM (C.Cache Int WebsocketRecord) getCache = do cache <- asks cache - return $ cache.projectWebsocket + return cache.projectWebsocket diff --git a/wizard-server/src/Wizard/Cache/UserCache.hs b/wizard-server/src/Wizard/Cache/UserCache.hs index 5438f5493..c143586c4 100644 --- a/wizard-server/src/Wizard/Cache/UserCache.hs +++ b/wizard-server/src/Wizard/Cache/UserCache.hs @@ -98,4 +98,4 @@ countCache = do getCache :: AppContextM (C.Cache Int User) getCache = do context <- ask - return $ context.cache.user + return context.cache.user diff --git a/wizard-server/src/Wizard/Database/DAO/Project/ProjectDAO.hs b/wizard-server/src/Wizard/Database/DAO/Project/ProjectDAO.hs index 345d3d62a..ca1be2b4c 100644 --- a/wizard-server/src/Wizard/Database/DAO/Project/ProjectDAO.hs +++ b/wizard-server/src/Wizard/Database/DAO/Project/ProjectDAO.hs @@ -58,7 +58,7 @@ findProjects = do if currentUser.uRole == _USER_ROLE_ADMIN then createFindEntitiesBySortedFn entityName [tenantQueryUuid tenantUuid] [Sort "name" Ascending] >>= traverse enhance else do - let sql = f' (projectSelectSql (U.toString tenantUuid) (U.toString $ currentUser.uuid) "['VIEW']") [""] ++ " ORDER BY project.name ASC" + let sql = f' (projectSelectSql (U.toString tenantUuid) (U.toString currentUser.uuid) "['VIEW']") [""] ++ " ORDER BY project.name ASC" logInfoI _CMP_DATABASE sql let action conn = query_ conn (fromString sql) entities <- runDB action @@ -275,7 +275,7 @@ findProjectsByKnowledgeModelPackageUuid pkgUuid = do else do let sql = fromString $ - f' (projectSelectSql (U.toString tenantUuid) (U.toString $ currentUser.uuid) "['VIEW']") ["AND knowledge_model_package_uuid = ?"] + f' (projectSelectSql (U.toString tenantUuid) (U.toString currentUser.uuid) "['VIEW']") ["AND knowledge_model_package_uuid = ?"] let params = [U.toString pkgUuid] logQuery sql params let action conn = query conn sql params @@ -291,7 +291,7 @@ findProjectsByDocumentTemplateUuid documentTemplateUuid = do else do let sql = fromString $ - f' (projectSelectSql (U.toString tenantUuid) (U.toString $ currentUser.uuid) "['VIEW']") ["AND document_template_uuid = ?"] + f' (projectSelectSql (U.toString tenantUuid) (U.toString currentUser.uuid) "['VIEW']") ["AND document_template_uuid = ?"] let params = [documentTemplateUuid] logQuery sql params let action conn = query conn sql params diff --git a/wizard-server/src/Wizard/Database/Migration/Development/Document/Data/Documents.hs b/wizard-server/src/Wizard/Database/Migration/Development/Document/Data/Documents.hs index 5d398da7a..27760cb4c 100644 --- a/wizard-server/src/Wizard/Database/Migration/Development/Document/Data/Documents.hs +++ b/wizard-server/src/Wizard/Database/Migration/Development/Document/Data/Documents.hs @@ -43,7 +43,7 @@ doc1 = , projectRepliesHash = hash . M.toList $ project1Ctn.replies , documentTemplateUuid = wizardDocumentTemplate.uuid , formatUuid = formatJson.uuid - , createdBy = Just $ userNikola.uuid + , createdBy = Just userNikola.uuid , fileName = Just "export.txt" , contentType = Just "text/plain" , fileSize = Just $ 50 * 1024 @@ -140,7 +140,7 @@ doc2 = , projectRepliesHash = hash . M.toList $ project2Ctn.replies , documentTemplateUuid = wizardDocumentTemplate.uuid , formatUuid = formatJson.uuid - , createdBy = Just $ userNikola.uuid + , createdBy = Just userNikola.uuid , fileName = Just "export.txt" , contentType = Just "text/plain" , fileSize = Just $ 50 * 1024 @@ -163,7 +163,7 @@ doc3 = , projectRepliesHash = hash . M.toList $ project2Ctn.replies , documentTemplateUuid = wizardDocumentTemplate.uuid , formatUuid = formatJson.uuid - , createdBy = Just $ userAlbert.uuid + , createdBy = Just userAlbert.uuid , fileName = Just "export.txt" , contentType = Just "text/plain" , fileSize = Just $ 50 * 1024 @@ -246,7 +246,7 @@ differentDoc = , projectRepliesHash = hash . M.toList $ project1Ctn.replies , documentTemplateUuid = differentDocumentTemplate.uuid , formatUuid = formatJson.uuid - , createdBy = Just $ userCharles.uuid + , createdBy = Just userCharles.uuid , fileName = Just "export.txt" , contentType = Just "text/plain" , fileSize = Just $ 50 * 1024 diff --git a/wizard-server/src/Wizard/Database/Migration/Development/KnowledgeModel/Data/Editor/KnowledgeModelEditors.hs b/wizard-server/src/Wizard/Database/Migration/Development/KnowledgeModel/Data/Editor/KnowledgeModelEditors.hs index 691aa635f..f080e95a0 100644 --- a/wizard-server/src/Wizard/Database/Migration/Development/KnowledgeModel/Data/Editor/KnowledgeModelEditors.hs +++ b/wizard-server/src/Wizard/Database/Migration/Development/KnowledgeModel/Data/Editor/KnowledgeModelEditors.hs @@ -43,7 +43,7 @@ amsterdamKnowledgeModelEditorList = , previousPackageUuid = Just netherlandsKmPackage.uuid , forkOfPackage = Just $ PM.toSuggestion netherlandsKmPackage , state = EditedKnowledgeModelEditorState - , createdBy = Just $ userAlbert.uuid + , createdBy = Just userAlbert.uuid , createdAt = UTCTime (fromJust $ fromGregorianValid 2018 1 25) 0 , updatedAt = UTCTime (fromJust $ fromGregorianValid 2018 1 25) 0 } @@ -160,7 +160,7 @@ leidenKnowledgeModelEditor = , state = DefaultKnowledgeModelEditorState , previousPackageUuid = Just netherlandsKmPackage.uuid , forkOfPackage = Just $ PM.toSuggestion netherlandsKmPackage - , createdBy = Just $ userAlbert.uuid + , createdBy = Just userAlbert.uuid , createdAt = UTCTime (fromJust $ fromGregorianValid 2018 1 25) 0 , updatedAt = UTCTime (fromJust $ fromGregorianValid 2018 1 25) 0 } @@ -184,10 +184,10 @@ differentKnowledgeModelEditor = , description = "Some desc" , readme = "Some readme" , license = "Apache-2.0" - , previousPackageUuid = Just $ differentPackage.uuid + , previousPackageUuid = Just differentPackage.uuid , metamodelVersion = knowledgeModelMetamodelVersion , squashed = True - , createdBy = Just $ userCharles.uuid + , createdBy = Just userCharles.uuid , tenantUuid = differentTenant.uuid , createdAt = UTCTime (fromJust $ fromGregorianValid 2018 1 25) 0 , updatedAt = UTCTime (fromJust $ fromGregorianValid 2018 1 25) 0 diff --git a/wizard-server/src/Wizard/Database/Migration/Development/Project/Data/ProjectEvents.hs b/wizard-server/src/Wizard/Database/Migration/Development/Project/Data/ProjectEvents.hs index 615905683..0faf85dd8 100644 --- a/wizard-server/src/Wizard/Database/Migration/Development/Project/Data/ProjectEvents.hs +++ b/wizard-server/src/Wizard/Database/Migration/Development/Project/Data/ProjectEvents.hs @@ -70,7 +70,7 @@ sre_rQ1 projectUuid = , value = (snd rQ1).value , projectUuid = projectUuid , tenantUuid = defaultTenantUuid - , createdBy = fmap (.uuid) $ (snd rQ1).createdBy + , createdBy = fmap (.uuid) (snd rQ1).createdBy , createdAt = (snd rQ1).createdAt } @@ -85,7 +85,7 @@ sre_rQ1Updated projectUuid = , value = (snd rQ1Updated).value , projectUuid = projectUuid , tenantUuid = defaultTenantUuid - , createdBy = fmap (.uuid) $ (snd rQ1Updated).createdBy + , createdBy = fmap (.uuid) (snd rQ1Updated).createdBy , createdAt = (snd rQ1Updated).createdAt } @@ -103,7 +103,7 @@ sre_rQ2 projectUuid = , value = (snd rQ2).value , projectUuid = projectUuid , tenantUuid = defaultTenantUuid - , createdBy = fmap (.uuid) $ (snd rQ2).createdBy + , createdBy = fmap (.uuid) (snd rQ2).createdBy , createdAt = (snd rQ2).createdAt } @@ -118,7 +118,7 @@ sre_rQ2_aYes_fuQ1 projectUuid = , value = (snd rQ2_aYes_fuQ1).value , projectUuid = projectUuid , tenantUuid = defaultTenantUuid - , createdBy = fmap (.uuid) $ (snd rQ2_aYes_fuQ1).createdBy + , createdBy = fmap (.uuid) (snd rQ2_aYes_fuQ1).createdBy , createdAt = (snd rQ2_aYes_fuQ1).createdAt } @@ -133,7 +133,7 @@ sre_rQ3 projectUuid = , value = (snd rQ3).value , projectUuid = projectUuid , tenantUuid = defaultTenantUuid - , createdBy = fmap (.uuid) $ (snd rQ3).createdBy + , createdBy = fmap (.uuid) (snd rQ3).createdBy , createdAt = (snd rQ3).createdAt } @@ -148,7 +148,7 @@ sre_rQ4 projectUuid = , value = (snd rQ4).value , projectUuid = projectUuid , tenantUuid = defaultTenantUuid - , createdBy = fmap (.uuid) $ (snd rQ4).createdBy + , createdBy = fmap (.uuid) (snd rQ4).createdBy , createdAt = (snd rQ4).createdAt } @@ -163,7 +163,7 @@ sre_rQ4_it1_q5 projectUuid = , value = (snd rQ4_it1_q5).value , projectUuid = projectUuid , tenantUuid = defaultTenantUuid - , createdBy = fmap (.uuid) $ (snd rQ4_it1_q5).createdBy + , createdBy = fmap (.uuid) (snd rQ4_it1_q5).createdBy , createdAt = (snd rQ4_it1_q5).createdAt } @@ -178,7 +178,7 @@ sre_rQ4_it1_q5_it1_question7 projectUuid = , value = (snd rQ4_it1_q5_it1_question7).value , projectUuid = projectUuid , tenantUuid = defaultTenantUuid - , createdBy = fmap (.uuid) $ (snd rQ4_it1_q5_it1_question7).createdBy + , createdBy = fmap (.uuid) (snd rQ4_it1_q5_it1_question7).createdBy , createdAt = (snd rQ4_it1_q5_it1_question7).createdAt } @@ -193,7 +193,7 @@ sre_rQ4_it1_q5_it1_question8 projectUuid = , value = (snd rQ4_it1_q5_it1_question8).value , projectUuid = projectUuid , tenantUuid = defaultTenantUuid - , createdBy = fmap (.uuid) $ (snd rQ4_it1_q5_it1_question8).createdBy + , createdBy = fmap (.uuid) (snd rQ4_it1_q5_it1_question8).createdBy , createdAt = (snd rQ4_it1_q5_it1_question8).createdAt } @@ -208,7 +208,7 @@ sre_rQ4_it1_q6 projectUuid = , value = (snd rQ4_it1_q6).value , projectUuid = projectUuid , tenantUuid = defaultTenantUuid - , createdBy = fmap (.uuid) $ (snd rQ4_it1_q6).createdBy + , createdBy = fmap (.uuid) (snd rQ4_it1_q6).createdBy , createdAt = (snd rQ4_it1_q6).createdAt } @@ -223,7 +223,7 @@ sre_rQ4_it2_q5 projectUuid = , value = (snd rQ4_it2_q5).value , projectUuid = projectUuid , tenantUuid = defaultTenantUuid - , createdBy = fmap (.uuid) $ (snd rQ4_it2_q5).createdBy + , createdBy = fmap (.uuid) (snd rQ4_it2_q5).createdBy , createdAt = (snd rQ4_it2_q5).createdAt } @@ -238,7 +238,7 @@ sre_rQ4_it2_q6 projectUuid = , value = (snd rQ4_it2_q6).value , projectUuid = projectUuid , tenantUuid = defaultTenantUuid - , createdBy = fmap (.uuid) $ (snd rQ4_it2_q6).createdBy + , createdBy = fmap (.uuid) (snd rQ4_it2_q6).createdBy , createdAt = (snd rQ4_it2_q6).createdAt } @@ -253,7 +253,7 @@ sre_rQ9 projectUuid = , value = (snd rQ9).value , projectUuid = projectUuid , tenantUuid = defaultTenantUuid - , createdBy = fmap (.uuid) $ (snd rQ9).createdBy + , createdBy = fmap (.uuid) (snd rQ9).createdBy , createdAt = (snd rQ9).createdAt } @@ -268,7 +268,7 @@ sre_rQ10 projectUuid = , value = (snd rQ10).value , projectUuid = projectUuid , tenantUuid = defaultTenantUuid - , createdBy = fmap (.uuid) $ (snd rQ10).createdBy + , createdBy = fmap (.uuid) (snd rQ10).createdBy , createdAt = (snd rQ10).createdAt } @@ -293,7 +293,7 @@ sphse_1 :: U.UUID -> SetPhaseEvent sphse_1 projectUuid = SetPhaseEvent { uuid = createEventUuid projectUuid "ee411f0005d3" - , phaseUuid = Just $ phase1.uuid + , phaseUuid = Just phase1.uuid , projectUuid = projectUuid , tenantUuid = defaultTenantUuid , createdBy = Just userAlbert.uuid @@ -307,7 +307,7 @@ sphse_2 :: U.UUID -> SetPhaseEvent sphse_2 projectUuid = SetPhaseEvent { uuid = createEventUuid projectUuid "43eae0986894" - , phaseUuid = Just $ phase2.uuid + , phaseUuid = Just phase2.uuid , projectUuid = projectUuid , tenantUuid = defaultTenantUuid , createdBy = Just userAlbert.uuid @@ -321,7 +321,7 @@ sphse_3 :: U.UUID -> SetPhaseEvent sphse_3 projectUuid = SetPhaseEvent { uuid = createEventUuid projectUuid "dacc8f77de05" - , phaseUuid = Just $ phase3.uuid + , phaseUuid = Just phase3.uuid , projectUuid = projectUuid , tenantUuid = defaultTenantUuid , createdBy = Just userAlbert.uuid diff --git a/wizard-server/src/Wizard/Database/Migration/Development/Project/Data/Projects.hs b/wizard-server/src/Wizard/Database/Migration/Development/Project/Data/Projects.hs index 5f02cb4d7..06d2ef4d0 100644 --- a/wizard-server/src/Wizard/Database/Migration/Development/Project/Data/Projects.hs +++ b/wizard-server/src/Wizard/Database/Migration/Development/Project/Data/Projects.hs @@ -61,9 +61,9 @@ project1 = , knowledgeModelPackageUuid = germanyKmPackage.uuid , selectedQuestionTagUuids = [] , projectTags = [_PROJECT_TAG_1] - , documentTemplateUuid = Just $ wizardDocumentTemplate.uuid - , formatUuid = Just $ formatJson.uuid - , creatorUuid = Just $ userAlbert.uuid + , documentTemplateUuid = Just wizardDocumentTemplate.uuid + , formatUuid = Just formatJson.uuid + , creatorUuid = Just userAlbert.uuid , permissions = [project1AlbertEditProjectPerm] , isTemplate = True , squashed = True @@ -109,7 +109,7 @@ project1Versions = qVersions project1Uuid project1Ctn :: ProjectContent project1Ctn = ProjectContent - { phaseUuid = Just $ phase1.uuid + { phaseUuid = Just phase1.uuid , replies = fReplies , labels = fLabels } @@ -188,9 +188,9 @@ project2 = , knowledgeModelPackageUuid = germanyKmPackage.uuid , selectedQuestionTagUuids = [] , projectTags = [_PROJECT_TAG_1, _PROJECT_TAG_2] - , documentTemplateUuid = Just $ wizardDocumentTemplate.uuid - , formatUuid = Just $ formatJson.uuid - , creatorUuid = Just $ userAlbert.uuid + , documentTemplateUuid = Just wizardDocumentTemplate.uuid + , formatUuid = Just formatJson.uuid + , creatorUuid = Just userAlbert.uuid , permissions = [project2AlbertEditProjectPerm] , isTemplate = False , squashed = True @@ -210,9 +210,9 @@ project2Edited = , knowledgeModelPackageUuid = project2.knowledgeModelPackageUuid , selectedQuestionTagUuids = project2.selectedQuestionTagUuids , projectTags = project2.projectTags - , documentTemplateUuid = Just $ wizardDocumentTemplate.uuid - , formatUuid = Just $ formatJson.uuid - , creatorUuid = Just $ userAlbert.uuid + , documentTemplateUuid = Just wizardDocumentTemplate.uuid + , formatUuid = Just formatJson.uuid + , creatorUuid = Just userAlbert.uuid , permissions = [] , isTemplate = False , squashed = True @@ -240,16 +240,16 @@ project2SettingsEdited = project2 { name = "EDITED: " ++ project2.name , description = Just "EDITED: Some description" - , documentTemplateUuid = Just $ wizardDocumentTemplate.uuid - , formatUuid = Just $ formatJson.uuid - , creatorUuid = Just $ userAlbert.uuid + , documentTemplateUuid = Just wizardDocumentTemplate.uuid + , formatUuid = Just formatJson.uuid + , creatorUuid = Just userAlbert.uuid , isTemplate = False } project2Ctn :: ProjectContent project2Ctn = ProjectContent - { phaseUuid = Just $ phase1.uuid + { phaseUuid = Just phase1.uuid , replies = fReplies , labels = fLabels } @@ -289,8 +289,8 @@ project3 = , knowledgeModelPackageUuid = germanyKmPackage.uuid , selectedQuestionTagUuids = [] , projectTags = [] - , documentTemplateUuid = Just $ wizardDocumentTemplate.uuid - , formatUuid = Just $ formatJson.uuid + , documentTemplateUuid = Just wizardDocumentTemplate.uuid + , formatUuid = Just formatJson.uuid , creatorUuid = Nothing , permissions = [] , isTemplate = False @@ -309,7 +309,7 @@ project3Versions = qVersions project3Uuid project3Ctn :: ProjectContent project3Ctn = ProjectContent - { phaseUuid = Just $ phase1.uuid + { phaseUuid = Just phase1.uuid , replies = fReplies , labels = fLabels } @@ -336,8 +336,8 @@ project4 = , knowledgeModelPackageUuid = netherlandsKmPackage.uuid , selectedQuestionTagUuids = [] , projectTags = [] - , documentTemplateUuid = Just $ wizardDocumentTemplate.uuid - , formatUuid = Just $ formatJson.uuid + , documentTemplateUuid = Just wizardDocumentTemplate.uuid + , formatUuid = Just formatJson.uuid , creatorUuid = Nothing , permissions = [] , isTemplate = False @@ -356,7 +356,7 @@ project4Versions = [] project4Ctn :: ProjectContent project4Ctn = ProjectContent - { phaseUuid = Just $ phase2.uuid + { phaseUuid = Just phase2.uuid , replies = M.empty , labels = M.empty } @@ -453,7 +453,7 @@ project6Versions = qVersions project6Uuid project6Ctn :: ProjectContent project6Ctn = ProjectContent - { phaseUuid = Just $ phase1.uuid + { phaseUuid = Just phase1.uuid , replies = fReplies , labels = fLabels } @@ -504,7 +504,7 @@ project7Versions = qVersions project7Uuid project7Ctn :: ProjectContent project7Ctn = ProjectContent - { phaseUuid = Just $ phase1.uuid + { phaseUuid = Just phase1.uuid , replies = fReplies , labels = fLabels } @@ -616,7 +616,7 @@ project10Versions = qVersions project10Uuid project10Ctn :: ProjectContent project10Ctn = ProjectContent - { phaseUuid = Just $ phase1.uuid + { phaseUuid = Just phase1.uuid , replies = fReplies , labels = fLabels } @@ -916,9 +916,9 @@ differentProject = , knowledgeModelPackageUuid = differentPackage.uuid , selectedQuestionTagUuids = [] , projectTags = [] - , documentTemplateUuid = Just $ differentDocumentTemplate.uuid - , formatUuid = Just $ formatJson.uuid - , creatorUuid = Just $ userCharles.uuid + , documentTemplateUuid = Just differentDocumentTemplate.uuid + , formatUuid = Just formatJson.uuid + , creatorUuid = Just userCharles.uuid , permissions = [differentCharlesOwnerProjectPerm] , isTemplate = True , squashed = True diff --git a/wizard-server/src/Wizard/Database/Migration/Development/Tenant/Data/TenantLimitBundles.hs b/wizard-server/src/Wizard/Database/Migration/Development/Tenant/Data/TenantLimitBundles.hs index ad5f48ce6..d04226270 100644 --- a/wizard-server/src/Wizard/Database/Migration/Development/Tenant/Data/TenantLimitBundles.hs +++ b/wizard-server/src/Wizard/Database/Migration/Development/Tenant/Data/TenantLimitBundles.hs @@ -19,7 +19,7 @@ defaultTenantLimitBundle = , projects = -1000 , documents = -1000 , locales = -1000 - , storage = -1000 * 5 * 1000 * 1000 + , storage = (-1000) * 5 * 1000 * 1000 , createdAt = dt' 2018 1 25 , updatedAt = dt' 2018 1 25 } @@ -43,7 +43,7 @@ differentTenantLimitBundle = , projects = -1000 , documents = -1000 , locales = -1000 - , storage = -1000 * 5 * 1000 * 1000 + , storage = (-1000) * 5 * 1000 * 1000 , createdAt = dt' 2018 1 25 , updatedAt = dt' 2018 1 25 } diff --git a/wizard-server/src/Wizard/Integration/Http/TypeHint/ResponseMapper.hs b/wizard-server/src/Wizard/Integration/Http/TypeHint/ResponseMapper.hs index 29fc0331e..d01edcfbc 100644 --- a/wizard-server/src/Wizard/Integration/Http/TypeHint/ResponseMapper.hs +++ b/wizard-server/src/Wizard/Integration/Http/TypeHint/ResponseMapper.hs @@ -141,3 +141,5 @@ toResponseErrorMessage e = "Connection already closed." describeContent (InvalidProxySettings txt) = "Invalid proxy settings: " ++ T.unpack txt ++ "." + describeContent TooManyHeaderFields = + "Too many header fields: the server returned too many header fields in the response." diff --git a/wizard-server/src/Wizard/Model/Context/ContextLenses.hs b/wizard-server/src/Wizard/Model/Context/ContextLenses.hs index 66c08f83f..76b19b8fd 100644 --- a/wizard-server/src/Wizard/Model/Context/ContextLenses.hs +++ b/wizard-server/src/Wizard/Model/Context/ContextLenses.hs @@ -97,7 +97,7 @@ instance HasField "buildInfoConfig'" BaseContext BuildInfoConfig where getField = (.buildInfoConfig) instance HasField "identity'" AppContext (Maybe String) where - getField entity = fmap (U.toString . (.uuid)) $ entity.currentUser + getField entity = fmap (U.toString . (.uuid)) entity.currentUser instance HasField "identityEmail'" AppContext (Maybe String) where getField entity = fmap (.email) entity.currentUser diff --git a/wizard-server/src/Wizard/Service/Acl/AclMapper.hs b/wizard-server/src/Wizard/Service/Acl/AclMapper.hs index f8532d657..26ed4afac 100644 --- a/wizard-server/src/Wizard/Service/Acl/AclMapper.hs +++ b/wizard-server/src/Wizard/Service/Acl/AclMapper.hs @@ -11,7 +11,7 @@ toUserMemberDTO user = { uuid = user.uuid , firstName = user.firstName , lastName = user.lastName - , gravatarHash = createGravatarHash $ user.email + , gravatarHash = createGravatarHash user.email , imageUrl = user.imageUrl } diff --git a/wizard-server/src/Wizard/Service/Config/Client/ClientConfigMapper.hs b/wizard-server/src/Wizard/Service/Config/Client/ClientConfigMapper.hs index a0be449d4..0792bbba2 100644 --- a/wizard-server/src/Wizard/Service/Config/Client/ClientConfigMapper.hs +++ b/wizard-server/src/Wizard/Service/Config/Client/ClientConfigMapper.hs @@ -27,7 +27,7 @@ toClientConfigDTO serverConfig tcOrganization tcAuthentication tcPrivacyAndSuppo , lookAndFeel = tcLookAndFeel , registry = toClientConfigRegistryDTO serverConfig.registry tcRegistry , project = toClientConfigProjectDTO tcProject - , submission = SimpleFeature $ tcSubmission.enabled + , submission = SimpleFeature tcSubmission.enabled , cloud = toClientConfigCloudDTO serverConfig.cloud tenant , owl = tcOwl , admin = toClientConfigAdminDTO serverConfig.admin tenant @@ -99,9 +99,9 @@ toClientConfigProjectDTO tenantConfig = { projectVisibility = tenantConfig.projectVisibility , projectSharing = tenantConfig.projectSharing , projectCreation = tenantConfig.projectCreation - , projectTagging = SimpleFeature $ tenantConfig.projectTagging.enabled + , projectTagging = SimpleFeature tenantConfig.projectTagging.enabled , summaryReport = tenantConfig.summaryReport - , feedback = SimpleFeature $ tenantConfig.feedback.enabled + , feedback = SimpleFeature tenantConfig.feedback.enabled } toClientConfigCloudDTO :: ServerConfigCloud -> Tenant -> ClientConfigCloudDTO diff --git a/wizard-server/src/Wizard/Service/Config/Integration/IntegrationConfigService.hs b/wizard-server/src/Wizard/Service/Config/Integration/IntegrationConfigService.hs index d4c2b03a8..e5ff0dc37 100644 --- a/wizard-server/src/Wizard/Service/Config/Integration/IntegrationConfigService.hs +++ b/wizard-server/src/Wizard/Service/Config/Integration/IntegrationConfigService.hs @@ -16,10 +16,7 @@ getFileIntegrationConfig :: String -> AppContextM (M.Map String String) getFileIntegrationConfig sectionName = do serverConfig <- asks serverConfig mFileNameEnv <- liftIO $ lookupEnv "INTEGRATION_CONFIG_PATH" - let integrationConfigPath = - case mFileNameEnv of - Just fileNameEnv -> fileNameEnv - Nothing -> serverConfig.general.integrationConfig + let integrationConfigPath = fromMaybe serverConfig.general.integrationConfig mFileNameEnv eIntConfig <- liftIO $ decodeFileEither integrationConfigPath case eIntConfig of Right intConfig -> return . fromMaybe M.empty . M.lookup sectionName $ intConfig diff --git a/wizard-server/src/Wizard/Service/Document/Context/DocumentContextService.hs b/wizard-server/src/Wizard/Service/Document/Context/DocumentContextService.hs index bd1e5bd64..9874846fd 100644 --- a/wizard-server/src/Wizard/Service/Document/Context/DocumentContextService.hs +++ b/wizard-server/src/Wizard/Service/Document/Context/DocumentContextService.hs @@ -99,7 +99,7 @@ createDocumentContext doc pkg kmEditorEvents project mReplies = do findProjectVersionUuid :: U.UUID -> [ProjectVersion] -> Maybe U.UUID findProjectVersionUuid _ [] = Nothing findProjectVersionUuid desiredEventUuid (version : rest) - | desiredEventUuid == version.eventUuid = Just $ version.uuid + | desiredEventUuid == version.eventUuid = Just version.uuid | otherwise = findProjectVersionUuid desiredEventUuid rest heSettingsToPerms :: Project -> AppContextM ([DocumentContextUserPerm], [DocumentContextUserGroupPerm]) diff --git a/wizard-server/src/Wizard/Service/DocumentTemplate/DocumentTemplateMapper.hs b/wizard-server/src/Wizard/Service/DocumentTemplate/DocumentTemplateMapper.hs index 9e227ed17..31a7e58ce 100644 --- a/wizard-server/src/Wizard/Service/DocumentTemplate/DocumentTemplateMapper.hs +++ b/wizard-server/src/Wizard/Service/DocumentTemplate/DocumentTemplateMapper.hs @@ -128,7 +128,7 @@ toDetailDTO tml formats registryEnabled tmlRs orgRs versionLs registryLink pkgs , versions = map toVersionDTO . L.sortBy (\(_, v1) (_, v2) -> compare v2 v1) $ versionLs , remoteLatestVersion = case (registryEnabled, selectDocumentTemplateByOrgIdAndTmlId tml tmlRs) of - (True, Just tmlR) -> Just $ tmlR.remoteVersion + (True, Just tmlR) -> Just tmlR.remoteVersion _ -> Nothing , state = computeDocumentTemplateState tmlRs tml , registryLink = diff --git a/wizard-server/src/Wizard/Service/DocumentTemplate/Draft/DocumentTemplateDraftMapper.hs b/wizard-server/src/Wizard/Service/DocumentTemplate/Draft/DocumentTemplateDraftMapper.hs index 5dcf440a7..c193db0fc 100644 --- a/wizard-server/src/Wizard/Service/DocumentTemplate/Draft/DocumentTemplateDraftMapper.hs +++ b/wizard-server/src/Wizard/Service/DocumentTemplate/Draft/DocumentTemplateDraftMapper.hs @@ -127,13 +127,13 @@ fromCreateDTO dto uuid dt formats organizationId now = , createdAt = now , updatedAt = now } - :: DocumentTemplateFormatStep + :: DocumentTemplateFormatStep ) (steps f) , createdAt = now , updatedAt = now } - :: DocumentTemplateFormat + :: DocumentTemplateFormat ) formats ) diff --git a/wizard-server/src/Wizard/Service/KnowledgeModel/Editor/EditorAudit.hs b/wizard-server/src/Wizard/Service/KnowledgeModel/Editor/EditorAudit.hs index 63de25a90..44ddca6d8 100644 --- a/wizard-server/src/Wizard/Service/KnowledgeModel/Editor/EditorAudit.hs +++ b/wizard-server/src/Wizard/Service/KnowledgeModel/Editor/EditorAudit.hs @@ -16,7 +16,7 @@ auditKnowledgeModelEditorPublish kmEditor kmEditorEvents mForkOfPkgId = logAuditWithBody "knowledge_model_editor" "publish" - (U.toString $ kmEditor.uuid) + (U.toString kmEditor.uuid) ( M.fromList [ ("kmId", kmEditor.kmId) , ("eventSize", show . length $ kmEditorEvents) diff --git a/wizard-server/src/Wizard/Service/KnowledgeModel/Editor/EditorUtil.hs b/wizard-server/src/Wizard/Service/KnowledgeModel/Editor/EditorUtil.hs index 342ffff15..4a8a5f6ec 100644 --- a/wizard-server/src/Wizard/Service/KnowledgeModel/Editor/EditorUtil.hs +++ b/wizard-server/src/Wizard/Service/KnowledgeModel/Editor/EditorUtil.hs @@ -26,7 +26,7 @@ getEditorForkOfPackageId editor = do Just previousPkg -> do tcOrganization <- findTenantConfigOrganization if (previousPkg.organizationId == tcOrganization.organizationId) && (previousPkg.kmId == editor.kmId) - then return $ previousPkg.forkOfPackageId + then return previousPkg.forkOfPackageId else return . Just . createCoordinate $ previousPkg Nothing -> return Nothing @@ -37,7 +37,7 @@ getEditorMergeCheckpointPackageId editor = do Just previousPkg -> do tcOrganization <- findTenantConfigOrganization if (previousPkg.organizationId == tcOrganization.organizationId) && (previousPkg.kmId == editor.kmId) - then return $ previousPkg.mergeCheckpointPackageId + then return previousPkg.mergeCheckpointPackageId else return . Just . createCoordinate $ previousPkg Nothing -> return Nothing diff --git a/wizard-server/src/Wizard/Service/KnowledgeModel/Migration/KnowledgeModelMigrationAudit.hs b/wizard-server/src/Wizard/Service/KnowledgeModel/Migration/KnowledgeModelMigrationAudit.hs index 21176678f..00231f3ba 100644 --- a/wizard-server/src/Wizard/Service/KnowledgeModel/Migration/KnowledgeModelMigrationAudit.hs +++ b/wizard-server/src/Wizard/Service/KnowledgeModel/Migration/KnowledgeModelMigrationAudit.hs @@ -26,7 +26,7 @@ auditKmMigrationSolve editorUuid reqDto = "knowledge_model_migration" "solve" (U.toString editorUuid) - (M.fromList [("originalEventUuid", U.toString $ reqDto.originalEventUuid), ("action", show reqDto.action)]) + (M.fromList [("originalEventUuid", U.toString reqDto.originalEventUuid), ("action", show reqDto.action)]) auditKmMigrationApplyAll :: U.UUID -> AppContextM () auditKmMigrationApplyAll editorUuid = logAudit "knowledge_model_migration" "applyAll" (U.toString editorUuid) diff --git a/wizard-server/src/Wizard/Service/KnowledgeModel/Migration/Migrator/CleanerMethod.hs b/wizard-server/src/Wizard/Service/KnowledgeModel/Migration/Migrator/CleanerMethod.hs index 2b4ef7355..c7a67290f 100644 --- a/wizard-server/src/Wizard/Service/KnowledgeModel/Migration/Migrator/CleanerMethod.hs +++ b/wizard-server/src/Wizard/Service/KnowledgeModel/Migration/Migrator/CleanerMethod.hs @@ -66,8 +66,8 @@ doIsCleanerMethod km event = MoveQuestionEvent' content -> isNothing (M.lookup event.entityUuid (getQuestionsM km)) || ( isNothing (M.lookup content.targetUuid (getChaptersM km)) - && isNothing (M.lookup content.targetUuid (getQuestionsM km)) - && isNothing (M.lookup content.targetUuid (getAnswersM km)) + && isNothing (M.lookup content.targetUuid (getQuestionsM km)) + && isNothing (M.lookup content.targetUuid (getAnswersM km)) ) MoveAnswerEvent' content -> isNothing (M.lookup event.entityUuid (getAnswersM km)) diff --git a/wizard-server/src/Wizard/Service/KnowledgeModel/Migration/Migrator/Migrator.hs b/wizard-server/src/Wizard/Service/KnowledgeModel/Migration/Migrator/Migrator.hs index dc5fa253d..6370129b1 100644 --- a/wizard-server/src/Wizard/Service/KnowledgeModel/Migration/Migrator/Migrator.hs +++ b/wizard-server/src/Wizard/Service/KnowledgeModel/Migration/Migrator/Migrator.hs @@ -16,7 +16,7 @@ migrate state = case state.state of RunningKnowledgeModelMigrationState -> do newState <- foldl doMigrate (return state) state.targetPackageEvents - if null $ newState.targetPackageEvents + if null newState.targetPackageEvents then return $ newState {state = CompletedKnowledgeModelMigrationState} else return newState _ -> return state @@ -35,14 +35,14 @@ solveConflict :: KnowledgeModelMigration -> KnowledgeModelMigrationResolutionDTO solveConflict state mcDto = case mcDto.action of ApplyKnowledgeModelMigrationAction -> - let events = tail $ state.targetPackageEvents + let events = tail state.targetPackageEvents targetEvent = case state.state of ConflictKnowledgeModelMigrationState event -> fromJust event _ -> error "Expected a CorrectorConflict in ApplyKnowledgeModelMigrationAction action" in createNewKm targetEvent . toRunningState . updateEvents events . addToResultEvent targetEvent $ state RejectKnowledgeModelMigrationAction -> - let events = tail $ state.targetPackageEvents + let events = tail state.targetPackageEvents in toRunningState . updateEvents events $ state where toRunningState newState = newState {state = RunningKnowledgeModelMigrationState} diff --git a/wizard-server/src/Wizard/Service/KnowledgeModel/Package/KnowledgeModelPackageAudit.hs b/wizard-server/src/Wizard/Service/KnowledgeModel/Package/KnowledgeModelPackageAudit.hs index ea3d684c7..d4733589c 100644 --- a/wizard-server/src/Wizard/Service/KnowledgeModel/Package/KnowledgeModelPackageAudit.hs +++ b/wizard-server/src/Wizard/Service/KnowledgeModel/Package/KnowledgeModelPackageAudit.hs @@ -24,8 +24,8 @@ auditPackageFailedToDeleteDueParentPackages entityId pkgs = auditPackageFailedToDeleteDueKmEditors :: U.UUID -> [KnowledgeModelEditor] -> AppContextM () auditPackageFailedToDeleteDueKmEditors entityId knowledgeModelEditors = - auditPackageFailedToDelete entityId "Knowledge Model Editor" (show $ fmap (\b -> U.toString $ b.uuid) knowledgeModelEditors) + auditPackageFailedToDelete entityId "Knowledge Model Editor" (show $ fmap (\b -> U.toString b.uuid) knowledgeModelEditors) auditPackageFailedToDeleteDueProjects :: U.UUID -> [Project] -> AppContextM () auditPackageFailedToDeleteDueProjects entityId projects = - auditPackageFailedToDelete entityId "Knowledge Model Editor" (show $ fmap (\project -> U.toString $ project.uuid) projects) + auditPackageFailedToDelete entityId "Knowledge Model Editor" (show $ fmap (\project -> U.toString project.uuid) projects) diff --git a/wizard-server/src/Wizard/Service/KnowledgeModel/Package/KnowledgeModelPackageMapper.hs b/wizard-server/src/Wizard/Service/KnowledgeModel/Package/KnowledgeModelPackageMapper.hs index 266b23479..1a162c130 100644 --- a/wizard-server/src/Wizard/Service/KnowledgeModel/Package/KnowledgeModelPackageMapper.hs +++ b/wizard-server/src/Wizard/Service/KnowledgeModel/Package/KnowledgeModelPackageMapper.hs @@ -29,7 +29,7 @@ toSimpleDTO' pkgRs orgRs pkg = , phase = pkg.phase , remoteLatestVersion = case selectPackageByOrgIdAndKmId pkg pkgRs of - Just pkgR -> Just $ pkgR.remoteVersion + Just pkgR -> Just pkgR.remoteVersion Nothing -> Nothing , description = pkg.description , nonEditable = pkg.nonEditable @@ -89,7 +89,7 @@ toDetailDTO pkg registryEnabled pkgRs orgRs versionLs registryLink = , versions = map toVersionDTO . L.sortBy (\(_, v1) (_, v2) -> compare v2 v1) $ versionLs , remoteLatestVersion = case (registryEnabled, selectPackageByOrgIdAndKmId pkg pkgRs) of - (True, Just pkgR) -> Just $ pkgR.remoteVersion + (True, Just pkgR) -> Just pkgR.remoteVersion _ -> Nothing , registryLink = if registryEnabled diff --git a/wizard-server/src/Wizard/Service/KnowledgeModel/Squash/Squasher.hs b/wizard-server/src/Wizard/Service/KnowledgeModel/Squash/Squasher.hs index 01230b0be..8305b277e 100644 --- a/wizard-server/src/Wizard/Service/KnowledgeModel/Squash/Squasher.hs +++ b/wizard-server/src/Wizard/Service/KnowledgeModel/Squash/Squasher.hs @@ -14,7 +14,7 @@ instance Ord KnowledgeModelEvent where squash :: [KnowledgeModelEvent] -> [KnowledgeModelEvent] squash events = - let groupedEvents = groupBy (\e1 e2 -> utctDay (e1.createdAt) == utctDay (e2.createdAt)) events + let groupedEvents = groupBy (\e1 e2 -> utctDay e1.createdAt == utctDay e2.createdAt) events squashedEvents = fmap (squashReorderEvents . squashSimple) groupedEvents in concat squashedEvents diff --git a/wizard-server/src/Wizard/Service/Locale/LocaleMapper.hs b/wizard-server/src/Wizard/Service/Locale/LocaleMapper.hs index 4ef7e9a04..309e2c801 100644 --- a/wizard-server/src/Wizard/Service/Locale/LocaleMapper.hs +++ b/wizard-server/src/Wizard/Service/Locale/LocaleMapper.hs @@ -65,7 +65,7 @@ toDetailDTO locale registryEnabled localeRs orgRs versionLs registryLink = , versions = map toVersionDTO . L.sortBy (\(_, v1) (_, v2) -> compare v2 v1) $ versionLs , remoteLatestVersion = case (registryEnabled, selectLocaleByOrgIdAndLocaleId locale localeRs) of - (True, Just localeR) -> Just $ localeR.remoteVersion + (True, Just localeR) -> Just localeR.remoteVersion _ -> Nothing , registryLink = if registryEnabled diff --git a/wizard-server/src/Wizard/Service/Owl/OwlService.hs b/wizard-server/src/Wizard/Service/Owl/OwlService.hs index 936ab7d9a..5b0429721 100644 --- a/wizard-server/src/Wizard/Service/Owl/OwlService.hs +++ b/wizard-server/src/Wizard/Service/Owl/OwlService.hs @@ -84,6 +84,6 @@ setOwlProperties name organizationId kmId version previousKnowledgeModelPackageI , previousKnowledgeModelPackageId = previousKnowledgeModelPackageId , rootElement = rootElement } - :: TenantConfigOwl + :: TenantConfigOwl updateTenantConfigOwl tcOwlUpdated return () diff --git a/wizard-server/src/Wizard/Service/Project/Collaboration/ProjectCollaborationAcl.hs b/wizard-server/src/Wizard/Service/Project/Collaboration/ProjectCollaborationAcl.hs index 6b2d4183e..6df873ea8 100644 --- a/wizard-server/src/Wizard/Service/Project/Collaboration/ProjectCollaborationAcl.hs +++ b/wizard-server/src/Wizard/Service/Project/Collaboration/ProjectCollaborationAcl.hs @@ -52,10 +52,10 @@ getPermission visibility sharing permissions mCurrentUserUuid mCurrentUserRole m isExplicitlyEditor = maybe False (`elem` getUserUuidsForEditorPerm permissions) mCurrentUserUuid isExplicitlyCommenter = maybe False (`elem` getUserUuidsForCommenterPerm permissions) mCurrentUserUuid isExplicitlyViewer = maybe False (`elem` getUserUuidsForViewerPerm permissions) mCurrentUserUuid - isInOwnerGroup = or (fmap (`elem` getUserGroupUuidsForOwnerPerm permissions) mCurrentUserGroupUuids) - isInEditorGroup = or (fmap (`elem` getUserGroupUuidsForEditorPerm permissions) mCurrentUserGroupUuids) - isInCommenterGroup = or (fmap (`elem` getUserGroupUuidsForCommenterPerm permissions) mCurrentUserGroupUuids) - isInViewerGroup = or (fmap (`elem` getUserGroupUuidsForViewerPerm permissions) mCurrentUserGroupUuids) + isInOwnerGroup = any (`elem` getUserGroupUuidsForOwnerPerm permissions) mCurrentUserGroupUuids + isInEditorGroup = any (`elem` getUserGroupUuidsForEditorPerm permissions) mCurrentUserGroupUuids + isInCommenterGroup = any (`elem` getUserGroupUuidsForCommenterPerm permissions) mCurrentUserGroupUuids + isInViewerGroup = any (`elem` getUserGroupUuidsForViewerPerm permissions) mCurrentUserGroupUuids isLogged = isJust mCurrentUserUuid isAdmin = mCurrentUserRole == Just _USER_ROLE_ADMIN diff --git a/wizard-server/src/Wizard/Service/Project/Migration/Migrator/MoveSanitizer.hs b/wizard-server/src/Wizard/Service/Project/Migration/Migrator/MoveSanitizer.hs index 7c655e06e..f71f557a2 100644 --- a/wizard-server/src/Wizard/Service/Project/Migration/Migrator/MoveSanitizer.hs +++ b/wizard-server/src/Wizard/Service/Project/Migration/Migrator/MoveSanitizer.hs @@ -67,7 +67,7 @@ takeDiffSuffix (Just sharedNode) = tailSafe . dropWhile (/= sharedNode) takeDiffSuffix Nothing = Prelude.id shouldWeMigrate :: KnowledgeModel -> [U.UUID] -> [U.UUID] -> Bool -shouldWeMigrate km pPathDiff tPathDiff = not . or . fmap (isItListQuestion km) $ pPathDiff ++ tPathDiff +shouldWeMigrate km pPathDiff tPathDiff = not . any (isItListQuestion km) $ pPathDiff ++ tPathDiff doMigration :: KnowledgeModel -> U.UUID -> [U.UUID] -> [U.UUID] -> [ReplyTuple] -> [ReplyTuple] doMigration km entUuid pPathDiff tPathDiff replies = diff --git a/wizard-server/src/Wizard/Service/Project/Migration/Migrator/Sanitizer.hs b/wizard-server/src/Wizard/Service/Project/Migration/Migrator/Sanitizer.hs index 333448a43..0d14dcf25 100644 --- a/wizard-server/src/Wizard/Service/Project/Migration/Migrator/Sanitizer.hs +++ b/wizard-server/src/Wizard/Service/Project/Migration/Migrator/Sanitizer.hs @@ -64,12 +64,12 @@ generateSetReplyEvents projectUuid oldReplies sanitizedReplies = foldl generateE else acc ++ [ SetReplyEventList' $ - SetReplyEventList - eUuid - keyFromSanitizedReply - valueFromSanitizedReply.value - (Just (toSuggestion' user)) - now + SetReplyEventList + eUuid + keyFromSanitizedReply + valueFromSanitizedReply.value + (Just (toSuggestion' user)) + now ] Nothing -> acc diff --git a/wizard-server/src/Wizard/Service/Project/Migration/ProjectMigrationAudit.hs b/wizard-server/src/Wizard/Service/Project/Migration/ProjectMigrationAudit.hs index 61fdbed29..3df18f45c 100644 --- a/wizard-server/src/Wizard/Service/Project/Migration/ProjectMigrationAudit.hs +++ b/wizard-server/src/Wizard/Service/Project/Migration/ProjectMigrationAudit.hs @@ -21,8 +21,8 @@ auditProjectMigrationCreate reqDto oldProject newProject = ( M.fromList [ ("sourceKnowledgeModelPackageUuid", U.toString oldProject.knowledgeModelPackageUuid) , ("targetKnowledgeModelPackageUuid", U.toString reqDto.targetKnowledgeModelPackageUuid) - , ("oldProjectUuid", U.toString $ oldProject.uuid) - , ("newProjectUuid", U.toString $ newProject.uuid) + , ("oldProjectUuid", U.toString oldProject.uuid) + , ("newProjectUuid", U.toString newProject.uuid) ] ) @@ -31,7 +31,7 @@ auditProjectMigrationModify projectMigration resolvedQuestionUuids = logAuditWithBody "project_migration" "modify" - (U.toString $ projectMigration.newProject.uuid) + (U.toString projectMigration.newProject.uuid) (M.fromList [("resolvedQuestionUuids", show resolvedQuestionUuids)]) auditProjectMigrationFinish :: Project -> Project -> AppContextM () @@ -41,9 +41,9 @@ auditProjectMigrationFinish oldProject newProject = "finish" (U.toString oldProject.uuid) ( M.fromList - [("oldProjectUuid", U.toString $ oldProject.uuid), ("newProjectUuid", U.toString $ newProject.uuid)] + [("oldProjectUuid", U.toString oldProject.uuid), ("newProjectUuid", U.toString newProject.uuid)] ) auditProjectMigrationCancel :: ProjectMigrationDTO -> AppContextM () auditProjectMigrationCancel projectMigration = - logAudit "project_migration" "cancel" (U.toString $ projectMigration.oldProject.uuid) + logAudit "project_migration" "cancel" (U.toString projectMigration.oldProject.uuid) diff --git a/wizard-server/src/Wizard/Service/Project/Migration/ProjectMigrationService.hs b/wizard-server/src/Wizard/Service/Project/Migration/ProjectMigrationService.hs index 129a34ace..244c44c52 100644 --- a/wizard-server/src/Wizard/Service/Project/Migration/ProjectMigrationService.hs +++ b/wizard-server/src/Wizard/Service/Project/Migration/ProjectMigrationService.hs @@ -104,7 +104,7 @@ finishProjectMigration projectUuid = , knowledgeModelPackageUuid = newProject.knowledgeModelPackageUuid , updatedAt = now } - :: Project + :: Project let newProjectEventsWithOldProjectUuid = fmap (\event -> setProjectUuid event oldProject.uuid) newProjectEvents newVersionsWithNewUuid <- traverse generateNewVersionUuid newProjectVersions let newVersionsWithOldProjectUuid = fmap (\v -> v {projectUuid = oldProject.uuid} :: ProjectVersion) newVersionsWithNewUuid @@ -156,7 +156,7 @@ upgradeProject reqDto oldProject = do , formatUuid = newFormatUuid , permissions = newPermissions } - :: Project + :: Project versionsWithOldProjectUuid <- findProjectVersionsByProjectUuid oldProject.uuid newVersionsWithNewUuid <- traverse generateNewVersionUuid versionsWithOldProjectUuid let newVersionsWithNewEventUuid = diff --git a/wizard-server/src/Wizard/Service/Project/ProjectAcl.hs b/wizard-server/src/Wizard/Service/Project/ProjectAcl.hs index 0619cc78f..edfdd0340 100644 --- a/wizard-server/src/Wizard/Service/Project/ProjectAcl.hs +++ b/wizard-server/src/Wizard/Service/Project/ProjectAcl.hs @@ -77,10 +77,10 @@ hasViewPermissionToProject visibility sharing perms = , currentUser.uuid `elem` getUserUuidsForEditorPerm perms , currentUser.uuid `elem` getUserUuidsForOwnerPerm perms , -- Check groups - or (fmap (`elem` getUserGroupUuidsForViewerPerm perms) currentUserGroupUuids) - , or (fmap (`elem` getUserGroupUuidsForCommenterPerm perms) currentUserGroupUuids) - , or (fmap (`elem` getUserGroupUuidsForEditorPerm perms) currentUserGroupUuids) - , or (fmap (`elem` getUserGroupUuidsForOwnerPerm perms) currentUserGroupUuids) + any (`elem` getUserGroupUuidsForViewerPerm perms) currentUserGroupUuids + , any (`elem` getUserGroupUuidsForCommenterPerm perms) currentUserGroupUuids + , any (`elem` getUserGroupUuidsForEditorPerm perms) currentUserGroupUuids + , any (`elem` getUserGroupUuidsForOwnerPerm perms) currentUserGroupUuids ] then return True else return False @@ -111,9 +111,9 @@ hasCommentPermissionToProject visibility sharing perms = , currentUser.uuid `elem` getUserUuidsForEditorPerm perms , currentUser.uuid `elem` getUserUuidsForOwnerPerm perms , -- Check groups - or (fmap (`elem` getUserGroupUuidsForCommenterPerm perms) currentUserGroupUuids) - , or (fmap (`elem` getUserGroupUuidsForEditorPerm perms) currentUserGroupUuids) - , or (fmap (`elem` getUserGroupUuidsForOwnerPerm perms) currentUserGroupUuids) + any (`elem` getUserGroupUuidsForCommenterPerm perms) currentUserGroupUuids + , any (`elem` getUserGroupUuidsForEditorPerm perms) currentUserGroupUuids + , any (`elem` getUserGroupUuidsForOwnerPerm perms) currentUserGroupUuids ] then return True else return False @@ -142,8 +142,8 @@ hasEditPermissionToProject visibility sharing perms = currentUser.uuid `elem` getUserUuidsForEditorPerm perms , currentUser.uuid `elem` getUserUuidsForOwnerPerm perms , -- Check groups - or (fmap (`elem` getUserGroupUuidsForEditorPerm perms) currentUserGroupUuids) - , or (fmap (`elem` getUserGroupUuidsForOwnerPerm perms) currentUserGroupUuids) + any (`elem` getUserGroupUuidsForEditorPerm perms) currentUserGroupUuids + , any (`elem` getUserGroupUuidsForOwnerPerm perms) currentUserGroupUuids ] then return True else return False @@ -166,7 +166,7 @@ hasOwnerPermissionToProject visibility perms = do , -- Check membership currentUser.uuid `elem` getUserUuidsForOwnerPerm perms , -- Check groups - or (fmap (`elem` getUserGroupUuidsForOwnerPerm perms) currentUserGroupUuids) + any (`elem` getUserGroupUuidsForOwnerPerm perms) currentUserGroupUuids ] then return True else return False @@ -191,8 +191,8 @@ hasMigrationPermissionToProject visibility perms = do currentUser.uuid `elem` getUserUuidsForEditorPerm perms , currentUser.uuid `elem` getUserUuidsForOwnerPerm perms , -- Check groups - or (fmap (`elem` getUserGroupUuidsForEditorPerm perms) currentUserGroupUuids) - , or (fmap (`elem` getUserGroupUuidsForOwnerPerm perms) currentUserGroupUuids) + any (`elem` getUserGroupUuidsForEditorPerm perms) currentUserGroupUuids + , any (`elem` getUserGroupUuidsForOwnerPerm perms) currentUserGroupUuids ] then return True else return False diff --git a/wizard-server/src/Wizard/Service/Project/ProjectService.hs b/wizard-server/src/Wizard/Service/Project/ProjectService.hs index a1c639d34..2d72f83d5 100644 --- a/wizard-server/src/Wizard/Service/Project/ProjectService.hs +++ b/wizard-server/src/Wizard/Service/Project/ProjectService.hs @@ -165,11 +165,11 @@ createProjectFromTemplate reqDto = , visibility = newVisibility , permissions = newPermissions , isTemplate = False - , creatorUuid = Just $ currentUser.uuid + , creatorUuid = Just currentUser.uuid , createdAt = now , updatedAt = now } - :: Project + :: Project insertProject newProject clonedFiles <- cloneProjectFiles originProject.uuid newProject.uuid newProjectEventsWithOldEventUuid <- cloneProjectEventsWithOldEventUuid originProjectEvents @@ -203,7 +203,7 @@ cloneProject cloneUuid = , permissions = newDuplicatedPermissions , updatedAt = now } - :: Project + :: Project insertProject newProject clonedFiles <- cloneProjectFiles originProject.uuid newProject.uuid newProjectEventsWithOldEventUuid <- cloneProjectEventsWithOldEventUuid originProjectEvents diff --git a/wizard-server/src/Wizard/Service/Project/ProjectUtil.hs b/wizard-server/src/Wizard/Service/Project/ProjectUtil.hs index 1d180c429..db0173079 100644 --- a/wizard-server/src/Wizard/Service/Project/ProjectUtil.hs +++ b/wizard-server/src/Wizard/Service/Project/ProjectUtil.hs @@ -22,13 +22,13 @@ extractVisibility dto = do tcProject <- getCurrentTenantConfigProject if tcProject.projectVisibility.enabled then return dto.visibility - else return $ tcProject.projectVisibility.defaultValue + else return tcProject.projectVisibility.defaultValue extractSharing dto = do tcProject <- getCurrentTenantConfigProject if tcProject.projectSharing.enabled then return dto.sharing - else return $ tcProject.projectSharing.defaultValue + else return tcProject.projectSharing.defaultValue enhanceProjectPerm :: ProjectPerm -> AppContextM ProjectPermDTO enhanceProjectPerm projectPerm = diff --git a/wizard-server/src/Wizard/Service/Project/Version/ProjectVersionValidation.hs b/wizard-server/src/Wizard/Service/Project/Version/ProjectVersionValidation.hs index 409298022..14ba579ad 100644 --- a/wizard-server/src/Wizard/Service/Project/Version/ProjectVersionValidation.hs +++ b/wizard-server/src/Wizard/Service/Project/Version/ProjectVersionValidation.hs @@ -25,10 +25,10 @@ validateProjectVersionUniqueness projectUuid reqDto = do mProjectVersion <- findProjectVersionByEventUuid' projectUuid reqDto.eventUuid when (isJust mProjectVersion) - (throwError . UserError $ _ERROR_SERVICE_PROJECT_VERSION__VERSION_UNIQUENESS (U.toString $ reqDto.eventUuid)) + (throwError . UserError $ _ERROR_SERVICE_PROJECT_VERSION__VERSION_UNIQUENESS (U.toString reqDto.eventUuid)) validateProjectVersionEventExistence :: ProjectVersionChangeDTO -> AppContextM () validateProjectVersionEventExistence reqDto = findProjectEventByUuid' reqDto.eventUuid >>= \case Just _ -> return () - Nothing -> throwError . UserError $ _ERROR_SERVICE_PROJECT_VERSION__NON_EXISTENT_EVENT_UUID (U.toString $ reqDto.eventUuid) + Nothing -> throwError . UserError $ _ERROR_SERVICE_PROJECT_VERSION__NON_EXISTENT_EVENT_UUID (U.toString reqDto.eventUuid) diff --git a/wizard-server/src/Wizard/Service/Report/Evaluator/Indication.hs b/wizard-server/src/Wizard/Service/Report/Evaluator/Indication.hs index 4cb3ab3fc..5639c9ed2 100644 --- a/wizard-server/src/Wizard/Service/Report/Evaluator/Indication.hs +++ b/wizard-server/src/Wizard/Service/Report/Evaluator/Indication.hs @@ -37,7 +37,7 @@ computePhasesAnsweredIndication mProjectPhase km replies ch = evaluateChapter :: Int -> Int -> Maybe U.UUID -> KnowledgeModel -> M.Map String Reply -> Chapter -> Int evaluateChapter found notFound mProjectPhase km replies ch = - let currentPath = U.toString $ ch.uuid + let currentPath = U.toString ch.uuid qs = getQuestionsForChapterUuid km ch.uuid in sum . fmap (evaluateQuestion found notFound mProjectPhase km replies currentPath) $ qs @@ -72,7 +72,7 @@ evaluateOptionsQuestion q found notFound mProjectPhase km replies path = evaluateListQuestion :: Int -> Int -> Maybe U.UUID -> KnowledgeModel -> M.Map String Reply -> String -> ListQuestion -> Int evaluateListQuestion found notFound mProjectPhase km replies currentPath q = - let itemQs = getItemTemplateQuestionsForQuestionUuid km $ q.uuid + let itemQs = getItemTemplateQuestionsForQuestionUuid km q.uuid items = case M.lookup currentPath replies of Just (Reply {value = ItemListReply {..}}) -> ilValue diff --git a/wizard-server/src/Wizard/Service/Report/Evaluator/Metric.hs b/wizard-server/src/Wizard/Service/Report/Evaluator/Metric.hs index acb5725b5..5f1b0cc11 100644 --- a/wizard-server/src/Wizard/Service/Report/Evaluator/Metric.hs +++ b/wizard-server/src/Wizard/Service/Report/Evaluator/Metric.hs @@ -47,7 +47,7 @@ filterEmptyMetricSummary ms = evaluateChapter :: KnowledgeModel -> M.Map String Reply -> Chapter -> [MetricMeasure] evaluateChapter km replies ch = - let currentPath = U.toString $ ch.uuid + let currentPath = U.toString ch.uuid qs = getQuestionsForChapterUuid km ch.uuid in concatMap (evaluateQuestion km replies currentPath) qs @@ -83,7 +83,7 @@ evaluateOptionsQuestion q km replies path = evaluateListQuestion :: KnowledgeModel -> M.Map String Reply -> String -> ListQuestion -> [MetricMeasure] evaluateListQuestion km replies currentPath q = - let itemQs = getItemTemplateQuestionsForQuestionUuid km $ q.uuid + let itemQs = getItemTemplateQuestionsForQuestionUuid km q.uuid items = case M.lookup currentPath replies of Just (Reply {value = ItemListReply {..}}) -> ilValue diff --git a/wizard-server/src/Wizard/Service/Submission/SubmissionService.hs b/wizard-server/src/Wizard/Service/Submission/SubmissionService.hs index 258cb4ef2..9694663a3 100644 --- a/wizard-server/src/Wizard/Service/Submission/SubmissionService.hs +++ b/wizard-server/src/Wizard/Service/Submission/SubmissionService.hs @@ -62,13 +62,13 @@ submitDocument docUuid reqDto = { state = DoneSubmissionState , location = mLocation } - :: Submission + :: Submission Left error -> sub { state = ErrorSubmissionState , returnedData = Just error } - :: Submission + :: Submission savedSubmission <- updateSubmissionByUuid updatedSub currentUser <- getCurrentUser return $ toList savedSubmission tcSubmission (toSuggestion' currentUser) diff --git a/wizard-server/src/Wizard/Service/Tenant/Limit/LimitMapper.hs b/wizard-server/src/Wizard/Service/Tenant/Limit/LimitMapper.hs index eab400197..89eed4532 100644 --- a/wizard-server/src/Wizard/Service/Tenant/Limit/LimitMapper.hs +++ b/wizard-server/src/Wizard/Service/Tenant/Limit/LimitMapper.hs @@ -19,7 +19,7 @@ fromCreate aUuid now = , projects = -1000 , documents = -1000 , locales = -1000 - , storage = -1000 * 5 * 1000 * 1000 + , storage = (-1000) * 5 * 1000 * 1000 , createdAt = now , updatedAt = now } diff --git a/wizard-server/src/Wizard/Service/Tenant/TenantService.hs b/wizard-server/src/Wizard/Service/Tenant/TenantService.hs index 4c068aac7..c3a310995 100644 --- a/wizard-server/src/Wizard/Service/Tenant/TenantService.hs +++ b/wizard-server/src/Wizard/Service/Tenant/TenantService.hs @@ -175,6 +175,6 @@ createLocale tntUuid now = do , createdAt = now , updatedAt = now } - :: Locale + :: Locale insertLocale locale return locale diff --git a/wizard-server/src/Wizard/Service/User/GroupMembership/UserGroupMembershipService.hs b/wizard-server/src/Wizard/Service/User/GroupMembership/UserGroupMembershipService.hs index 506bab10a..86153c5cf 100644 --- a/wizard-server/src/Wizard/Service/User/GroupMembership/UserGroupMembershipService.hs +++ b/wizard-server/src/Wizard/Service/User/GroupMembership/UserGroupMembershipService.hs @@ -32,8 +32,8 @@ modifyUserGroupMemberships command = let membershipsToDelete = membershipsDb L.\\ command.members let membershipsToAdd = command.members L.\\ membershipsDb let membershipToEdit = groupBy' (.userUuid) (.userUuid) memberships command.members - traverse_ insertUserGroupMembership . fmap (\dto -> fromCreateDTO dto command.userGroupUuid tenantUuid now) $ membershipsToAdd - traverse_ updateUserGroupMembershipByUuid . fmap (\(membership, dto) -> fromChangeDTO membership dto now) $ membershipToEdit + traverse_ (insertUserGroupMembership . (\dto -> fromCreateDTO dto command.userGroupUuid tenantUuid now)) membershipsToAdd + traverse_ (updateUserGroupMembershipByUuid . (\(membership, dto) -> fromChangeDTO membership dto now)) membershipToEdit unless (null membershipsToDelete) (deleteUserGroupMembership command.userGroupUuid (fmap (.userUuid) membershipsToDelete)) updateUserGroupByUuid $ userGroup {updatedAt = now} return () diff --git a/wizard-server/src/Wizard/Service/User/UserAudit.hs b/wizard-server/src/Wizard/Service/User/UserAudit.hs index e166745de..1d4bd0590 100644 --- a/wizard-server/src/Wizard/Service/User/UserAudit.hs +++ b/wizard-server/src/Wizard/Service/User/UserAudit.hs @@ -13,7 +13,7 @@ auditUserCreateByAdmin userDto = logAuditWithBody "user" "createByAdmin" - (U.toString $ userDto.uuid) + (U.toString userDto.uuid) (M.fromList [("firstName", userDto.firstName), ("lastName", userDto.lastName), ("email", userDto.email)]) auditUserCreateByCommand :: UserDTO -> AppContextM () @@ -21,5 +21,5 @@ auditUserCreateByCommand userDto = logAuditWithBody "user" "createByCommand" - (U.toString $ userDto.uuid) + (U.toString userDto.uuid) (M.fromList [("firstName", userDto.firstName), ("lastName", userDto.lastName), ("email", userDto.email)]) diff --git a/wizard-server/src/Wizard/Service/User/UserMapper.hs b/wizard-server/src/Wizard/Service/User/UserMapper.hs index 5c728bdc0..93a07efc9 100644 --- a/wizard-server/src/Wizard/Service/User/UserMapper.hs +++ b/wizard-server/src/Wizard/Service/User/UserMapper.hs @@ -108,7 +108,7 @@ toLoggedOnlineUserInfo user colorNumber groupUuids = { uuid = user.uuid , firstName = user.firstName , lastName = user.lastName - , gravatarHash = createGravatarHash $ user.email + , gravatarHash = createGravatarHash user.email , imageUrl = user.imageUrl , colorNumber = colorNumber , role = user.uRole diff --git a/wizard-server/src/Wizard/Service/User/UserService.hs b/wizard-server/src/Wizard/Service/User/UserService.hs index f99075510..f5b54ffcc 100644 --- a/wizard-server/src/Wizard/Service/User/UserService.hs +++ b/wizard-server/src/Wizard/Service/User/UserService.hs @@ -19,6 +19,7 @@ import Shared.Common.Model.Config.ServerConfig import Shared.Common.Model.Config.SimpleFeature import Shared.Common.Model.Error.Error import Shared.Common.Util.Crypto (generateRandomString) +import Shared.Common.Util.String import Shared.Common.Util.Uuid import Wizard.Api.Resource.Auth.AuthConsentDTO import Wizard.Api.Resource.User.UserChangeDTO @@ -232,7 +233,7 @@ changeUserPasswordByHash userUuid hash userPasswordDto = resetUserPassword :: ActionKeyDTO ActionKeyType -> AppContextM () resetUserPassword reqDto = runInTransaction $ do - mUser <- findUserByEmail' reqDto.email + mUser <- findUserByEmail' (toLower reqDto.email) case mUser of Just user -> do tenantUuid <- asks currentTenantUuid diff --git a/wizard-server/src/Wizard/Util/Interpolation.hs b/wizard-server/src/Wizard/Util/Interpolation.hs index 903bdb01b..29fc18ba6 100644 --- a/wizard-server/src/Wizard/Util/Interpolation.hs +++ b/wizard-server/src/Wizard/Util/Interpolation.hs @@ -1,13 +1,15 @@ module Wizard.Util.Interpolation where import Data.Map.Strict as M +import Data.Text as TS +import Data.Text.Lazy as TL import Text.Replace interpolateString :: M.Map String String -> String -> String interpolateString variables text = - let replaceMapFn (key, value) = (string'fromString $ "${" ++ key ++ "}", value) + let replaceMapFn (key, value) = (text'fromString $ "${" ++ key ++ "}", TS.pack value) replaceMap = M.fromList . fmap replaceMapFn . M.toList $ variables - in replaceWithMap replaceMap text + in TL.unpack $ replaceWithMap replaceMap (TL.pack text) interpolateMapValues :: M.Map String String -> M.Map String String -> M.Map String String interpolateMapValues variables = fmap (interpolateString variables) diff --git a/wizard-server/test/Wizard/Specs/API/Project/Detail_Content_PUT.hs b/wizard-server/test/Wizard/Specs/API/Project/Detail_Content_PUT.hs index f2acab919..7dbd03387 100644 --- a/wizard-server/test/Wizard/Specs/API/Project/Detail_Content_PUT.hs +++ b/wizard-server/test/Wizard/Specs/API/Project/Detail_Content_PUT.hs @@ -75,7 +75,7 @@ create_test_200 title appContext project projectEventsEdited authHeader = it title $ -- GIVEN: Prepare request do - let reqUrl = reqUrlT $ project.uuid + let reqUrl = reqUrlT project.uuid let reqHeaders = reqHeadersT authHeader -- AND: Prepare expectation let expStatus = 200 @@ -143,7 +143,7 @@ create_test_403 title appContext project projectEventsEdited authHeader reason = it title $ -- GIVEN: Prepare request do - let reqUrl = reqUrlT $ project.uuid + let reqUrl = reqUrlT project.uuid let reqHeaders = reqHeadersT authHeader -- AND: Prepare expectation let expStatus = 403 diff --git a/wizard-server/test/Wizard/Specs/API/Project/Detail_Report_GET.hs b/wizard-server/test/Wizard/Specs/API/Project/Detail_Report_GET.hs index ad6af0eb1..3f32fcbf3 100644 --- a/wizard-server/test/Wizard/Specs/API/Project/Detail_Report_GET.hs +++ b/wizard-server/test/Wizard/Specs/API/Project/Detail_Report_GET.hs @@ -72,7 +72,7 @@ create_test_200 title appContext project authHeader = it title $ -- GIVEN: Prepare request do - let reqUrl = reqUrlT $ project.uuid + let reqUrl = reqUrlT project.uuid let reqHeaders = reqHeadersT authHeader -- GIVEN: Prepare expectation let expStatus = 200 diff --git a/wizard-server/test/Wizard/Specs/API/Project/Detail_Settings_PUT.hs b/wizard-server/test/Wizard/Specs/API/Project/Detail_Settings_PUT.hs index 1101d6c3c..c7ef2f051 100644 --- a/wizard-server/test/Wizard/Specs/API/Project/Detail_Settings_PUT.hs +++ b/wizard-server/test/Wizard/Specs/API/Project/Detail_Settings_PUT.hs @@ -104,7 +104,7 @@ create_test_200 title appContext project projectEdited projectEvents projectCont it title $ -- GIVEN: Prepare request do - let reqUrl = reqUrlT $ project.uuid + let reqUrl = reqUrlT project.uuid let reqHeaders = reqHeadersT authHeader let reqBody = reqBodyT projectEdited -- AND: Prepare expectation @@ -174,7 +174,7 @@ create_test_403 title appContext project projectEdited reason = it title $ -- GIVEN: Prepare request do - let reqUrl = reqUrlT $ project.uuid + let reqUrl = reqUrlT project.uuid let reqHeaders = reqHeadersT [reqNonAdminAuthHeader] let reqBody = reqBodyT projectEdited -- AND: Prepare expectation diff --git a/wizard-server/test/Wizard/Specs/API/Project/Detail_Share_PUT.hs b/wizard-server/test/Wizard/Specs/API/Project/Detail_Share_PUT.hs index 84d91661d..6de90fe3e 100644 --- a/wizard-server/test/Wizard/Specs/API/Project/Detail_Share_PUT.hs +++ b/wizard-server/test/Wizard/Specs/API/Project/Detail_Share_PUT.hs @@ -102,7 +102,7 @@ create_test_200 title appContext project projectEdited projectEvents projectCont it title $ -- GIVEN: Prepare request do - let reqUrl = reqUrlT $ project.uuid + let reqUrl = reqUrlT project.uuid let reqHeaders = reqHeadersT authHeader let reqBody = reqBodyT projectEdited -- AND: Prepare expectation @@ -172,7 +172,7 @@ create_test_403 title appContext project projectEdited reason = it title $ -- GIVEN: Prepare request do - let reqUrl = reqUrlT $ project.uuid + let reqUrl = reqUrlT project.uuid let reqHeaders = reqHeadersT [reqNonAdminAuthHeader] let reqBody = reqBodyT projectEdited -- AND: Prepare expectation diff --git a/wizard-server/test/Wizard/Specs/API/Project/List_POST.hs b/wizard-server/test/Wizard/Specs/API/Project/List_POST.hs index fb1004f6f..d0013184a 100644 --- a/wizard-server/test/Wizard/Specs/API/Project/List_POST.hs +++ b/wizard-server/test/Wizard/Specs/API/Project/List_POST.hs @@ -107,7 +107,7 @@ create_test_201 appContext title anonymousSharingEnabled project authHeader = , permissions = [] , creatorUuid = Nothing } - :: Project + :: Project ) eventsInDB else do @@ -115,7 +115,7 @@ create_test_201 appContext title anonymousSharingEnabled project authHeader = [ (head project1.permissions) { projectUuid = resBody.uuid } - :: ProjectPerm + :: ProjectPerm ] assertExistenceOfProjectInDB appContext @@ -126,7 +126,7 @@ create_test_201 appContext title anonymousSharingEnabled project authHeader = , projectTags = [] , permissions = aPermissions } - :: Project + :: Project ) eventsInDB diff --git a/wizard-server/test/Wizard/Specs/API/Project/List_POST_CloneUuid.hs b/wizard-server/test/Wizard/Specs/API/Project/List_POST_CloneUuid.hs index 324c82aa1..025096faa 100644 --- a/wizard-server/test/Wizard/Specs/API/Project/List_POST_CloneUuid.hs +++ b/wizard-server/test/Wizard/Specs/API/Project/List_POST_CloneUuid.hs @@ -63,7 +63,7 @@ create_test_201 title appContext project = it title $ -- GIVEN: Prepare request do - let reqUrl = reqUrlT $ project.uuid + let reqUrl = reqUrlT project.uuid let reqHeaders = reqHeadersT reqAuthHeader -- AND: Prepare expectation let expStatus = 201 @@ -98,7 +98,7 @@ create_test_403 title appContext project reason = it title $ -- GIVEN: Prepare request do - let reqUrl = reqUrlT $ project.uuid + let reqUrl = reqUrlT project.uuid let reqHeaders = reqHeadersT reqNonAdminAuthHeader -- AND: Prepare expectation let expStatus = 403 diff --git a/wizard-server/test/Wizard/Specs/API/Project/Migration/List_Current_Completion_POST.hs b/wizard-server/test/Wizard/Specs/API/Project/Migration/List_Current_Completion_POST.hs index 63091c824..fd954610c 100644 --- a/wizard-server/test/Wizard/Specs/API/Project/Migration/List_Current_Completion_POST.hs +++ b/wizard-server/test/Wizard/Specs/API/Project/Migration/List_Current_Completion_POST.hs @@ -59,7 +59,7 @@ test_204 appContext = it "HTTP 204 NO CONTENT" $ -- GIVEN: Prepare request do - let reqUrl = reqUrlT $ project4Upgraded.uuid + let reqUrl = reqUrlT project4Upgraded.uuid let reqHeaders = reqHeadersT reqAuthHeader -- AND: Prepare expectation let expStatus = 204 @@ -99,7 +99,7 @@ create_test_403 title appContext project reason = it title $ -- GIVEN: Prepare request do - let reqUrl = reqUrlT $ project.uuid + let reqUrl = reqUrlT project.uuid let reqHeaders = reqHeadersT reqNonAdminAuthHeader -- AND: Prepare expectation let expStatus = 403 diff --git a/wizard-server/test/Wizard/Specs/API/Project/Migration/List_Current_DELETE.hs b/wizard-server/test/Wizard/Specs/API/Project/Migration/List_Current_DELETE.hs index f83728978..26e11bd90 100644 --- a/wizard-server/test/Wizard/Specs/API/Project/Migration/List_Current_DELETE.hs +++ b/wizard-server/test/Wizard/Specs/API/Project/Migration/List_Current_DELETE.hs @@ -59,7 +59,7 @@ test_204 appContext = it "HTTP 204 NO CONTENT" $ -- GIVEN: Prepare request do - let reqUrl = reqUrlT $ project4Upgraded.uuid + let reqUrl = reqUrlT project4Upgraded.uuid let reqHeaders = reqHeadersT reqAuthHeader -- AND: Prepare expectation let expStatus = 204 @@ -99,7 +99,7 @@ create_test_403 title appContext project reason = it title $ -- GIVEN: Prepare request do - let reqUrl = reqUrlT $ project.uuid + let reqUrl = reqUrlT project.uuid let reqHeaders = reqHeadersT reqNonAdminAuthHeader -- AND: Prepare expectation let expStatus = 403 diff --git a/wizard-server/test/Wizard/Specs/API/Project/Migration/List_Current_GET.hs b/wizard-server/test/Wizard/Specs/API/Project/Migration/List_Current_GET.hs index b951f9499..243fa74fa 100644 --- a/wizard-server/test/Wizard/Specs/API/Project/Migration/List_Current_GET.hs +++ b/wizard-server/test/Wizard/Specs/API/Project/Migration/List_Current_GET.hs @@ -91,7 +91,7 @@ create_test_200 title appContext oldProject oldProjectEvents newProject newProje it title $ -- GIVEN: Prepare request do - let reqUrl = reqUrlT $ project4Upgraded.uuid + let reqUrl = reqUrlT project4Upgraded.uuid let reqHeaders = reqHeadersT reqAuthHeader -- AND: Prepare expectation let expStatus = 200 @@ -132,7 +132,7 @@ create_test_403 title appContext project reason = it title $ -- GIVEN: Prepare request do - let reqUrl = reqUrlT $ project.uuid + let reqUrl = reqUrlT project.uuid let reqHeaders = reqHeadersT reqNonAdminAuthHeader -- AND: Prepare expectation let expStatus = 403 diff --git a/wizard-server/test/Wizard/Specs/API/Project/Migration/List_Current_PUT.hs b/wizard-server/test/Wizard/Specs/API/Project/Migration/List_Current_PUT.hs index fa53318b7..253f94380 100644 --- a/wizard-server/test/Wizard/Specs/API/Project/Migration/List_Current_PUT.hs +++ b/wizard-server/test/Wizard/Specs/API/Project/Migration/List_Current_PUT.hs @@ -62,7 +62,7 @@ test_204 appContext = it "HTTP 204 NO CONTENT" $ -- GIVEN: Prepare request do - let reqUrl = reqUrlT $ project4Upgraded.uuid + let reqUrl = reqUrlT project4Upgraded.uuid let reqHeaders = reqHeadersT reqAuthHeader -- AND: Prepare expectation let expStatus = 200 @@ -108,7 +108,7 @@ create_test_403 title appContext project reason = it title $ -- GIVEN: Prepare request do - let reqUrl = reqUrlT $ project.uuid + let reqUrl = reqUrlT project.uuid let reqHeaders = reqHeadersT reqNonAdminAuthHeader -- AND: Prepare expectation let expStatus = 403 diff --git a/wizard-server/test/Wizard/Specs/API/Project/Migration/List_POST.hs b/wizard-server/test/Wizard/Specs/API/Project/Migration/List_POST.hs index 6cc92690c..ed9fa7d36 100644 --- a/wizard-server/test/Wizard/Specs/API/Project/Migration/List_POST.hs +++ b/wizard-server/test/Wizard/Specs/API/Project/Migration/List_POST.hs @@ -98,7 +98,7 @@ create_test_201 title appContext oldProject oldProjectEvents newProject newProje it title $ -- GIVEN: Prepare request do - let reqUrl = reqUrlT $ oldProject.uuid + let reqUrl = reqUrlT oldProject.uuid let reqHeaders = reqHeadersT reqAuthHeader -- AND: Prepare expectation let expStatus = 201 @@ -150,7 +150,7 @@ create_test_403 title appContext project reason = it title $ -- GIVEN: Prepare request do - let reqUrl = reqUrlT $ project.uuid + let reqUrl = reqUrlT project.uuid let reqHeaders = reqHeadersT reqNonAdminAuthHeader -- AND: Prepare expectation let expStatus = 403 diff --git a/wizard-server/test/Wizard/Specs/API/User/Detail_PUT.hs b/wizard-server/test/Wizard/Specs/API/User/Detail_PUT.hs index 49e1caeba..766702325 100644 --- a/wizard-server/test/Wizard/Specs/API/User/Detail_PUT.hs +++ b/wizard-server/test/Wizard/Specs/API/User/Detail_PUT.hs @@ -85,7 +85,7 @@ test_400 appContext = do -- AND: Prepare expectation let expStatus = 400 let expHeaders = resCtHeader : resCorsHeaders - let expDto = ValidationError [] (M.singleton "email" [_ERROR_VALIDATION__USER_EMAIL_UNIQUENESS $ reqDto.email]) + let expDto = ValidationError [] (M.singleton "email" [_ERROR_VALIDATION__USER_EMAIL_UNIQUENESS reqDto.email]) let expBody = encode expDto -- AND: Run migrations runInContextIO U_Migration.runMigration appContext diff --git a/wizard-server/test/Wizard/Specs/API/User/List_Current_PUT.hs b/wizard-server/test/Wizard/Specs/API/User/List_Current_PUT.hs index ef4d51cb7..8dec13ba8 100644 --- a/wizard-server/test/Wizard/Specs/API/User/List_Current_PUT.hs +++ b/wizard-server/test/Wizard/Specs/API/User/List_Current_PUT.hs @@ -84,7 +84,7 @@ test_400 appContext = do -- AND: Prepare expectation let expStatus = 400 let expHeaders = resCtHeader : resCorsHeaders - let expDto = ValidationError [] (M.singleton "email" [_ERROR_VALIDATION__USER_EMAIL_UNIQUENESS $ reqDto.email]) + let expDto = ValidationError [] (M.singleton "email" [_ERROR_VALIDATION__USER_EMAIL_UNIQUENESS reqDto.email]) let expBody = encode expDto -- AND: Run migrations runInContextIO U_Migration.runMigration appContext diff --git a/wizard-server/test/Wizard/Specs/API/User/List_POST.hs b/wizard-server/test/Wizard/Specs/API/User/List_POST.hs index 38bc66283..2a9570850 100644 --- a/wizard-server/test/Wizard/Specs/API/User/List_POST.hs +++ b/wizard-server/test/Wizard/Specs/API/User/List_POST.hs @@ -106,7 +106,7 @@ create_test_400_email_uniqueness title appContext authHeaders = -- AND: Prepare expectation let expStatus = 400 let expHeaders = resCtHeader : resCorsHeaders - let expDto = ValidationError [] (M.singleton "email" [_ERROR_VALIDATION__USER_EMAIL_UNIQUENESS $ reqDto.email]) + let expDto = ValidationError [] (M.singleton "email" [_ERROR_VALIDATION__USER_EMAIL_UNIQUENESS reqDto.email]) let expBody = encode expDto -- WHEN: Call API response <- request reqMethod reqUrl reqHeaders reqBody diff --git a/wizard-server/test/Wizard/Specs/Service/KnowledgeModel/Migration/Migrator/SanitizerSpec.hs b/wizard-server/test/Wizard/Specs/Service/KnowledgeModel/Migration/Migrator/SanitizerSpec.hs index 7253c743d..257566088 100644 --- a/wizard-server/test/Wizard/Specs/Service/KnowledgeModel/Migration/Migrator/SanitizerSpec.hs +++ b/wizard-server/test/Wizard/Specs/Service/KnowledgeModel/Migration/Migrator/SanitizerSpec.hs @@ -63,7 +63,7 @@ sanitizerSpec appContext = , integrationUuids = ChangedValue kmIntegrationUuids } } - :: KnowledgeModelEvent + :: KnowledgeModelEvent let reqState = createTestMigratorStateWithEvents [] [editedEvent] (Just km1) -- When: (Right resState) <- runInContext (migrate reqState) appContext @@ -101,7 +101,7 @@ sanitizerSpec appContext = , integrationUuids = ChangedValue kmIntegrationUuids } } - :: KnowledgeModelEvent + :: KnowledgeModelEvent let reqState = createTestMigratorStateWithEvents [] [editedEvent] (Just km1) -- When: (Right resState) <- runInContext (migrate reqState) appContext @@ -139,7 +139,7 @@ sanitizerSpec appContext = { questionUuids = ChangedValue chQuestionUuids } } - :: KnowledgeModelEvent + :: KnowledgeModelEvent let reqState = createTestMigratorStateWithEvents [] [editedEvent] (Just km1) -- When: (Right resState) <- runInContext (migrate reqState) appContext @@ -164,7 +164,7 @@ sanitizerSpec appContext = { questionUuids = ChangedValue chQuestionUuids } } - :: KnowledgeModelEvent + :: KnowledgeModelEvent let reqState = createTestMigratorStateWithEvents [] [editedEvent] (Just km1) -- When: (Right resState) <- runInContext (migrate reqState) appContext @@ -207,7 +207,7 @@ sanitizerSpec appContext = , expertUuids = ChangedValue qExpertUuids } } - :: KnowledgeModelEvent + :: KnowledgeModelEvent let reqState = createTestMigratorStateWithEvents [] [editedEvent] (Just km1) -- When: (Right resState) <- runInContext (migrate reqState) appContext @@ -245,7 +245,7 @@ sanitizerSpec appContext = , expertUuids = ChangedValue qExpertUuids } } - :: KnowledgeModelEvent + :: KnowledgeModelEvent let reqState = createTestMigratorStateWithEvents [] [editedEvent] (Just km1) -- When: (Right resState) <- runInContext (migrate reqState) appContext @@ -283,7 +283,7 @@ sanitizerSpec appContext = { itemTemplateQuestionUuids = ChangedValue itQuestionUuids } } - :: KnowledgeModelEvent + :: KnowledgeModelEvent let reqState = createTestMigratorStateWithEvents [] [editedEvent] (Just km1WithQ4) -- When: (Right resState) <- runInContext (migrate reqState) appContext @@ -310,7 +310,7 @@ sanitizerSpec appContext = { itemTemplateQuestionUuids = ChangedValue itQuestionUuids } } - :: KnowledgeModelEvent + :: KnowledgeModelEvent let reqState = createTestMigratorStateWithEvents [] [editedEvent] (Just km1WithQ4) -- When: (Right resState) <- runInContext (migrate reqState) appContext @@ -347,7 +347,7 @@ sanitizerSpec appContext = { followUpUuids = ChangedValue ansFollowUpUuids } } - :: KnowledgeModelEvent + :: KnowledgeModelEvent let reqState = createTestMigratorStateWithEvents [] [editedEvent] (Just km1) -- When: (Right resState) <- runInContext (migrate reqState) appContext @@ -372,7 +372,7 @@ sanitizerSpec appContext = { followUpUuids = ChangedValue ansFollowUpUuids } } - :: KnowledgeModelEvent + :: KnowledgeModelEvent let reqState = createTestMigratorStateWithEvents [] [editedEvent] (Just km1) -- When: (Right resState) <- runInContext (migrate reqState) appContext @@ -415,7 +415,7 @@ sanitizerSpec appContext = , expertUuids = ChangedValue qExpertUuids } } - :: KnowledgeModelEvent + :: KnowledgeModelEvent let reqState = createTestMigratorStateWithEvents [] [editedEvent] (Just km1) -- When: (Right resState) <- runInContext (migrate reqState) appContext @@ -453,7 +453,7 @@ sanitizerSpec appContext = , expertUuids = ChangedValue qExpertUuids } } - :: KnowledgeModelEvent + :: KnowledgeModelEvent let reqState = createTestMigratorStateWithEvents [] [editedEvent] (Just km1) -- When: (Right resState) <- runInContext (migrate reqState) appContext @@ -490,7 +490,7 @@ sanitizerSpec appContext = { itemTemplateQuestionUuids = ChangedValue itQuestionUuids } } - :: KnowledgeModelEvent + :: KnowledgeModelEvent let reqState = createTestMigratorStateWithEvents [] [editedEvent] (Just km1WithQ4) -- When: (Right resState) <- runInContext (migrate reqState) appContext @@ -517,7 +517,7 @@ sanitizerSpec appContext = { itemTemplateQuestionUuids = ChangedValue itQuestionUuids } } - :: KnowledgeModelEvent + :: KnowledgeModelEvent let reqState = createTestMigratorStateWithEvents [] [editedEvent] (Just km1WithQ4) -- When: (Right resState) <- runInContext (migrate reqState) appContext @@ -561,7 +561,7 @@ sanitizerSpec appContext = , expertUuids = ChangedValue qExpertUuids } } - :: KnowledgeModelEvent + :: KnowledgeModelEvent let reqState = createTestMigratorStateWithEvents [] [editedEvent] (Just km1WithQ4) -- When: (Right resState) <- runInContext (migrate reqState) appContext @@ -599,7 +599,7 @@ sanitizerSpec appContext = , expertUuids = ChangedValue qExpertUuids } } - :: KnowledgeModelEvent + :: KnowledgeModelEvent let reqState = createTestMigratorStateWithEvents [] [editedEvent] (Just km1WithQ4) -- When: (Right resState) <- runInContext (migrate reqState) appContext @@ -636,7 +636,7 @@ sanitizerSpec appContext = { itemTemplateQuestionUuids = ChangedValue itQuestionUuids } } - :: KnowledgeModelEvent + :: KnowledgeModelEvent let reqState = createTestMigratorStateWithEvents [] [editedEvent] (Just km1WithQ4) -- When: (Right resState) <- runInContext (migrate reqState) appContext @@ -663,7 +663,7 @@ sanitizerSpec appContext = { itemTemplateQuestionUuids = ChangedValue itQuestionUuids } } - :: KnowledgeModelEvent + :: KnowledgeModelEvent let reqState = createTestMigratorStateWithEvents [] [editedEvent] (Just km1WithQ4) -- When: (Right resState) <- runInContext (migrate reqState) appContext diff --git a/wizard-server/test/Wizard/Specs/Service/Project/Migration/Migrator/MoveSanitizerSpec.hs b/wizard-server/test/Wizard/Specs/Service/Project/Migration/Migrator/MoveSanitizerSpec.hs index 5c223d55e..5d1d8fd33 100644 --- a/wizard-server/test/Wizard/Specs/Service/Project/Migration/Migrator/MoveSanitizerSpec.hs +++ b/wizard-server/test/Wizard/Specs/Service/Project/Migration/Migrator/MoveSanitizerSpec.hs @@ -48,7 +48,7 @@ sanitizerSpec = result `shouldBe` expected describe "computeParentPath" $ do createComputeParentPathTest chapter1.uuid [chapter1.uuid] - createComputeParentPathTest (q4_it1_q6_aYes_followUpQuestion4.uuid) q4_it1_q6_aYes_followUpQuestion4_path + createComputeParentPathTest q4_it1_q6_aYes_followUpQuestion4.uuid q4_it1_q6_aYes_followUpQuestion4_path describe "computeSharedNode" $ do it "Nothing in common" $ -- GIVEN: diff --git a/wizard-server/test/Wizard/Specs/Service/Report/ReportGeneratorSpec.hs b/wizard-server/test/Wizard/Specs/Service/Report/ReportGeneratorSpec.hs index 1b1616c2b..952e1c39c 100644 --- a/wizard-server/test/Wizard/Specs/Service/Report/ReportGeneratorSpec.hs +++ b/wizard-server/test/Wizard/Specs/Service/Report/ReportGeneratorSpec.hs @@ -25,7 +25,7 @@ createComputeChapterReportTest number chapter expectation = it ("computeChapterReport for chapter" ++ show number ++ " should work") $ -- GIVEN: Prepare do - let requiredPhaseUuidUuid = Just $ phase1.uuid + let requiredPhaseUuidUuid = Just phase1.uuid let km = km1WithQ4 let rs = M.fromList $ unused_rQ2_aYes_fuQ1_aYes_fuq2 : M.toList project1Ctn.replies -- WHEN: @@ -37,7 +37,7 @@ createComputeTotalReportTest number expectation = it "computeTotalReport should work" $ -- GIVEN: Prepare do - let requiredPhaseUuidUuid = Just $ phase1.uuid + let requiredPhaseUuidUuid = Just phase1.uuid let km = km1WithQ4 let rs = M.fromList $ unused_rQ2_aYes_fuQ1_aYes_fuq2 : M.toList project1Ctn.replies -- WHEN: diff --git a/wizard-server/test/Wizard/Specs/Websocket/KnowledgeModelEditor/Detail/GeneralSpec.hs b/wizard-server/test/Wizard/Specs/Websocket/KnowledgeModelEditor/Detail/GeneralSpec.hs index d05fb1253..23a41ba5d 100644 --- a/wizard-server/test/Wizard/Specs/Websocket/KnowledgeModelEditor/Detail/GeneralSpec.hs +++ b/wizard-server/test/Wizard/Specs/Websocket/KnowledgeModelEditor/Detail/GeneralSpec.hs @@ -89,7 +89,7 @@ test404 appContext = do -- AND: Connect to websocket ((c1, s1), (c2, s2)) <- connectTestWebsocketUsers appContext editor.uuid -- AND: Prepare expectation - let expError = NotExistsError (_ERROR_SERVICE_KNOWLEDGE_MODEL_EDITOR__COLLABORATION__FORCE_DISCONNECT (U.toString $ editor.uuid)) + let expError = NotExistsError (_ERROR_SERVICE_KNOWLEDGE_MODEL_EDITOR__COLLABORATION__FORCE_DISCONNECT (U.toString editor.uuid)) -- WHEN: Update permission runInContext (deleteEditor editor.uuid) appContext -- THEN: Read response diff --git a/wizard-server/test/Wizard/Specs/Websocket/Project/Detail/GeneralSpec.hs b/wizard-server/test/Wizard/Specs/Websocket/Project/Detail/GeneralSpec.hs index 724306946..3c108fc37 100644 --- a/wizard-server/test/Wizard/Specs/Websocket/Project/Detail/GeneralSpec.hs +++ b/wizard-server/test/Wizard/Specs/Websocket/Project/Detail/GeneralSpec.hs @@ -122,7 +122,7 @@ test404 appContext = do -- AND: Connect to websocket ((c1, s1), (c2, s2), (c3, s3)) <- connectTestWebsocketUsers appContext project.uuid -- AND: Prepare expectation - let expError = NotExistsError (_ERROR_SERVICE_PROJECT_COLLABORATION__FORCE_DISCONNECT (U.toString $ project.uuid)) + let expError = NotExistsError (_ERROR_SERVICE_PROJECT_COLLABORATION__FORCE_DISCONNECT (U.toString project.uuid)) -- WHEN: Update permission runInContext (deleteProject project.uuid True) appContext -- THEN: Read response