Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
160
Issues
160
List
Board
Labels
Milestones
Merge Requests
14
Merge Requests
14
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
haskell-gargantext
Commits
c6cf6b55
Commit
c6cf6b55
authored
Jan 22, 2024
by
Alfredo Di Napoli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix after rebase
parent
f4e80982
Pipeline
#5522
failed with stages
in 83 minutes and 24 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5 additions
and
8 deletions
+5
-8
cabal.project
cabal.project
+1
-1
Types.hs
src/Gargantext/API/Admin/Auth/Types.hs
+0
-4
Middleware.hs
src/Gargantext/API/Middleware.hs
+2
-1
Errors.hs
test/Test/API/Errors.hs
+1
-1
Main.hs
test/drivers/hspec/Main.hs
+1
-1
No files found.
cabal.project
View file @
c6cf6b55
...
...
@@ -116,7 +116,7 @@ source-repository-package
source
-
repository
-
package
type
:
git
location
:
https
://
gitlab
.
iscpif
.
fr
/
gargantext
/
crawlers
/
istex
.
git
tag
:
c
1aba6034ceddcd1cdd0378c3841068c96accca7
tag
:
c
0a08d62c40a169b7934ceb7cb12c39952160e7a
source
-
repository
-
package
type
:
git
...
...
src/Gargantext/API/Admin/Auth/Types.hs
View file @
c6cf6b55
...
...
@@ -111,8 +111,6 @@ instance ToSchema ForgotPasswordGet where
-- Lenses
--
makeLenses
''
A
uthValid
>>>>>>>
b7657056
(
Fix
compilation
errors
due
to
switch
to
GHC
9.4
.
7
)
makeLenses
''
A
uthResponse
--
...
...
@@ -121,8 +119,6 @@ makeLenses ''AuthResponse
$
(
deriveJSON
(
JSON
.
defaultOptions
{
JSON
.
fieldLabelModifier
=
tail
.
dropWhile
((
/=
)
'_'
)
.
tail
})
''
A
uthenticatedUser
)
$
(
deriveJSON
(
unPrefix
"_authReq_"
)
''
A
uthRequest
)
$
(
deriveJSON
(
unPrefix
"_authInv_"
)
''
A
uthInvalid
)
$
(
deriveJSON
(
unPrefix
"_authVal_"
)
''
A
uthValid
)
$
(
deriveJSON
(
unPrefix
"_authRes_"
)
''
A
uthResponse
)
$
(
deriveJSON
(
unPrefix
"_fpReq_"
)
''
F
orgotPasswordRequest
)
$
(
deriveJSON
(
unPrefix
"_fpRes_"
)
''
F
orgotPasswordResponse
)
...
...
src/Gargantext/API/Middleware.hs
View file @
c6cf6b55
...
...
@@ -15,6 +15,7 @@ import Data.ByteString qualified as BS
import
Data.ByteString.Char8
qualified
as
C8
import
Data.CaseInsensitive
qualified
as
CI
import
Data.List
qualified
as
L
import
Data.String
import
Data.Text
qualified
as
T
import
Data.Text.Encoding
qualified
as
TE
import
Network.HTTP.Types
...
...
@@ -38,7 +39,7 @@ logStdoutDevSanitised = mkRequestLogger $ defaultRequestLoggerSettings { outputF
-- >>> "{\"a\": 100, \"b\": 200}" & atKey "c" ?~ String "300"
-- "{\"a\":100,\"b\":200,\"c\":\"300\"}"
atKey
::
L
.
AsValue
t
=>
T
.
Text
->
Traversal'
t
(
Maybe
A
.
Value
)
atKey
i
=
L
.
_Object
.
at
i
atKey
i
=
L
.
_Object
.
at
(
fromString
$
T
.
unpack
i
)
{-# INLINE atKey #-}
customOutput
::
OutputFormatterWithDetailsAndHeaders
...
...
test/Test/API/Errors.hs
View file @
c6cf6b55
...
...
@@ -47,7 +47,7 @@ tests = sequential $ aroundAll withTestDBAndPort $ do
|
Status
{
..
}
<-
simpleStatus
->
liftIO
$
do
statusCode
`
shouldBe
`
404
simpleBody
`
shouldBe
`
[
r
|
{"
node":99,"error":"Node does not exist"
}
|]
simpleBody
`
shouldBe
`
[
r
|
{"
error":"Node does not exist","node":99
}
|]
it
"returns the new error if header X-Garg-Error-Scheme: new is passed"
$
\
((
_testEnv
,
port
),
app
)
->
do
withApplication
app
$
do
...
...
test/drivers/hspec/Main.hs
View file @
c6cf6b55
...
...
@@ -2,7 +2,7 @@
module
Main
where
import
Gargantext.Prelude
import
Gargantext.Prelude
hiding
(
isInfixOf
)
import
Control.Monad
import
Data.Text
(
isInfixOf
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment