Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
purescript-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
142
Issues
142
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
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
purescript-gargantext
Commits
3744eee3
Commit
3744eee3
authored
Mar 06, 2018
by
Abinaya Sudhir
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
solving 405 method not allowed options
parent
c0a13ee7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
10 deletions
+12
-10
AddCorpusview.purs
src/AddCorpusview.purs
+9
-7
Login.purs
src/Login.purs
+2
-2
PageRouter.purs
src/PageRouter.purs
+1
-1
No files found.
src/AddCorpusview.purs
View file @
3744eee3
...
...
@@ -20,6 +20,7 @@ import Data.MediaType.Common (applicationJSON)
import Network.HTTP.Affjax (AJAX, affjax, defaultRequest)
import Network.HTTP.RequestHeader (RequestHeader(..))
import Prelude hiding (div)
import React (ReactElement)
import React.DOM (a, button, div, form, h2, h3, h4, i, input, label, li, p, span, text, ul)
import React.DOM.Props (_id, _type, className, href, maxLength, name, onClick, onInput, placeholder, target, value)
import Routing.Hash.Aff (setHash)
...
...
@@ -95,13 +96,7 @@ addcorpusviewSpec = simpleSpec performAction render
, div [className "col-md-9"]
[
h3 [] [text "Corpusview"]
, ul [className "list-group"]
[
li [className "list-group-item justify-content-between"]
[
span [className "badge badge-default badge-pill"] []
]
]
, ul [className "list-group"] $ map fn1 state.response
]
]
...
...
@@ -110,6 +105,13 @@ addcorpusviewSpec = simpleSpec performAction render
]
fn1 :: Response -> ReactElement
fn1 (Response o) =
li [className "list-group-item justify-content-between"]
[
span [className "badge badge-default badge-pill"] [ text $ show o.count_count]
]
getDatabaseDetails :: forall eff. Aff (console::CONSOLE,ajax :: AJAX | eff) (Either String (Array Response))
getDatabaseDetails = do
let token = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1MTk5OTg1ODMsInVzZXJfaWQiOjUsImVtYWlsIjoiYWxleGFuZHJlLmRlbGFub2VAaXNjcGlmLmZyIiwidXNlcm5hbWUiOiJkZXZlbG9wZXIifQ.Os-3wuFNSmRIxCZi98oFNBu2zqGc0McO-dgDayozHJg"
...
...
src/Login.purs
View file @
3744eee3
...
...
@@ -69,7 +69,7 @@ performAction Login _ (State state) = void do
lift $ log $ show e
modifyState \(State s) -> State $ s { errorMessage = e}
Right r@(LoginRes response) -> do
lift $ setHash "/"
lift $ setHash "/
addCorpus
"
modifyState \(State s) -> State $ s {response = r, errorMessage = ""}
...
...
@@ -176,7 +176,7 @@ loginReq encodeData =
let
setting =
defaultRequest
{ url = "http
://unstable
.gargantext.org/api/auth/token"
{ url = "http
s://dev
.gargantext.org/api/auth/token"
, method = Left POST
, headers =
[ ContentType applicationJSON
...
...
src/PageRouter.purs
View file @
3744eee3
...
...
@@ -33,7 +33,7 @@ routing =
<|> addcorpusRoute
<|> home
where
addcorpusRoute = AddCorpus <$ route "
A
ddCorpus"
addcorpusRoute = AddCorpus <$ route "
a
ddCorpus"
loginRoute = Login <$ route "login"
home = Home <$ lit ""
route str = lit "" *> lit str
...
...
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