Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
ogptoolbox-ui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
53
Issues
53
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
ogptoolbox
ogptoolbox-ui
Commits
a7053d92
Commit
a7053d92
authored
Aug 12, 2017
by
Emmanuel Raviart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add rating parameter when upserting a property (for compatibility with Retruco-API).
parent
4eceae0c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
4 deletions
+5
-4
src/Cards/Item/State.elm
src/Cards/Item/State.elm
+1
-1
src/Properties/New/State.elm
src/Properties/New/State.elm
+1
-1
src/Requests.elm
src/Requests.elm
+3
-2
No files found.
src/Cards/Item/State.elm
View file @
a7053d92
...
...
@@ -382,7 +382,7 @@ update msg model =
Debug
.
crash
"
Cards.Item.State update ValueUpserted: model.editedKeyId == Nothing"
in
(
{
model
|
data
=
mergeData
data
model
.
data
}
,
Requests
.
postProperty
model
.
authentication
model
.
cardId
editedKeyId
data
.
id
,
Requests
.
postProperty
model
.
authentication
model
.
cardId
editedKeyId
data
.
id
1
|>
Http
.
send
(
ForSelf
<<
PropertyUpserted
)
)
...
...
src/Properties/New/State.elm
View file @
a7053d92
...
...
@@ -111,7 +111,7 @@ update msg model =
ValueUpserted
data
->
(
{
model
|
data
=
mergeData
data
model
.
data
}
,
Requests
.
postProperty
model
.
authentication
model
.
objectId
model
.
keyId
data
.
id
,
Requests
.
postProperty
model
.
authentication
model
.
objectId
model
.
keyId
data
.
id
1
|>
Http
.
send
(
ForSelf
<<
Upserted
)
)
...
...
src/Requests.elm
View file @
a7053d92
...
...
@@ -349,8 +349,8 @@ postCollection authentication collectionId collectionJson =
}
postProperty
:
Maybe
Authentication
->
String
->
String
->
String
->
Http
.
Request
DataIdBody
postProperty
authentication
objectId
keyId
valueId
=
postProperty
:
Maybe
Authentication
->
String
->
String
->
String
->
Int
->
Http
.
Request
DataIdBody
postProperty
authentication
objectId
keyId
valueId
rating
=
Http
.
request
{
method
=
"
POST"
,
headers
=
authenticationHeaders
authentication
...
...
@@ -359,6 +359,7 @@ postProperty authentication objectId keyId valueId =
Encode
.
object
[
(
"
keyId"
,
Encode
.
string
keyId
)
,
(
"
objectId"
,
Encode
.
string
objectId
)
,
(
"
rating"
,
Encode
.
int
rating
)
,
(
"
valueId"
,
Encode
.
string
valueId
)
]
|>
Http
.
jsonBody
...
...
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