Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
Przemyslaw Kaminski
haskell-gargantext
Commits
5c20ad2f
Commit
5c20ad2f
authored
Jan 06, 2021
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FIX] typos
parent
4d89fa1b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
10 deletions
+13
-10
Mail.hs
src/Gargantext/Core/Mail.hs
+7
-7
Flow.hs
src/Gargantext/Database/Action/Flow.hs
+4
-1
New.hs
src/Gargantext/Database/Action/User/New.hs
+2
-2
No files found.
src/Gargantext/Core/Mail.hs
View file @
5c20ad2f
...
...
@@ -27,9 +27,9 @@ isEmail = ((==) 2) . List.length . (splitOn "@")
------------------------------------------------------------------------
data
SendEmail
=
SendEmail
Bool
type
EmailAddress
=
Text
type
Name
=
Text
type
ServerAdress
=
Text
type
EmailAddress
=
Text
type
Name
=
Text
type
ServerAd
d
ress
=
Text
data
MailModel
=
Invitation
{
invitation_user
::
NewUser
GargPassword
}
|
PassUpdate
{
passUpdate_user
::
NewUser
GargPassword
}
...
...
@@ -38,7 +38,7 @@ data MailModel = Invitation { invitation_user :: NewUser GargPassword }
}
------------------------------------------------------------------------
------------------------------------------------------------------------
mail
::
ServerAdress
->
MailModel
->
IO
()
mail
::
ServerAd
d
ress
->
MailModel
->
IO
()
mail
server
model
=
gargMail
(
GargMail
m
(
Just
u
)
subject
body
)
where
(
m
,
u
)
=
email_to
model
...
...
@@ -46,7 +46,7 @@ mail server model = gargMail (GargMail m (Just u) subject body)
body
=
emailWith
server
model
------------------------------------------------------------------------
emailWith
::
ServerAdress
->
MailModel
->
Text
emailWith
::
ServerAd
d
ress
->
MailModel
->
Text
emailWith
server
model
=
unlines
$
[
"Hello"
]
<>
bodyWith
server
model
...
...
@@ -63,7 +63,7 @@ email_to' :: NewUser GargPassword -> (EmailAddress, Name)
email_to'
(
NewUser
u
m
_
)
=
(
u
,
m
)
------------------------------------------------------------------------
bodyWith
::
ServerAdress
->
MailModel
->
[
Text
]
bodyWith
::
ServerAd
d
ress
->
MailModel
->
[
Text
]
bodyWith
server
(
Invitation
u
)
=
[
"Congratulation, you have been granted a beta user account to test the"
,
"new GarganText platform!"
]
<>
(
email_credentials
server
u
)
...
...
@@ -80,7 +80,7 @@ email_subject (PassUpdate _) = "[GarganText] Update"
email_subject
(
MailInfo
_
_
)
=
"[GarganText] Info"
email_credentials
::
ServerAdress
->
NewUser
GargPassword
->
[
Text
]
email_credentials
::
ServerAd
d
ress
->
NewUser
GargPassword
->
[
Text
]
email_credentials
server
(
NewUser
u
_
(
GargPassword
p
))
=
[
""
,
"You can log in to: "
<>
server
...
...
src/Gargantext/Database/Action/Flow.hs
View file @
5c20ad2f
...
...
@@ -258,7 +258,10 @@ insertMasterDocs c lang hs = do
-- this will enable global database monitoring
-- maps :: IO Map Ngrams (Map NgramsType (Map NodeId Int))
mapNgramsDocs
<-
mapNodeIdNgrams
<$>
documentIdWithNgrams
(
extractNgramsT
$
withLang
lang
documentsWithId
)
documentsWithId
mapNgramsDocs
<-
mapNodeIdNgrams
<$>
documentIdWithNgrams
(
extractNgramsT
$
withLang
lang
documentsWithId
)
documentsWithId
terms2id
<-
insertNgrams
$
Map
.
keys
mapNgramsDocs
-- to be removed
...
...
src/Gargantext/Database/Action/User/New.hs
View file @
5c20ad2f
...
...
@@ -52,11 +52,11 @@ guessUserName n = case splitOn "@" n of
_
->
Nothing
------------------------------------------------------------------------
newUser'
::
HasNodeError
err
=>
ServerAdress
->
NewUser
GargPassword
->
Cmd
err
Int64
=>
ServerAd
d
ress
->
NewUser
GargPassword
->
Cmd
err
Int64
newUser'
address
u
=
newUsers'
address
[
u
]
newUsers'
::
HasNodeError
err
=>
ServerAdress
->
[
NewUser
GargPassword
]
->
Cmd
err
Int64
=>
ServerAd
d
ress
->
[
NewUser
GargPassword
]
->
Cmd
err
Int64
newUsers'
address
us
=
do
us'
<-
liftBase
$
mapM
toUserHash
us
r
<-
insertUsers
$
map
toUserWrite
us'
...
...
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