Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
client
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elixxir
client
Commits
96dfef9c
Commit
96dfef9c
authored
2 years ago
by
Jake Taylor
Browse files
Options
Downloads
Patches
Plain Diff
comments
parent
fa2a17d9
No related branches found
No related tags found
3 merge requests
!510
Release
,
!214
Project/restlike
,
!207
WIP: Client Restructure
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
restlike/receiver.go
+2
-2
2 additions, 2 deletions
restlike/receiver.go
with
2 additions
and
2 deletions
restlike/receiver.go
+
2
−
2
View file @
96dfef9c
...
...
@@ -25,7 +25,7 @@ type singleReceiver struct {
// Callback is the handler for single-use message reception for a RestServer
// Automatically responds to invalid endpoint requests
func
(
s
*
singleReceiver
)
Callback
(
req
*
single
.
Request
,
receptionId
receptionID
.
EphemeralIdentity
,
rounds
[]
rounds
.
Round
)
{
// Unmarshal the payload
// Unmarshal the
request
payload
newMessage
:=
&
Message
{}
err
:=
proto
.
Unmarshal
(
req
.
GetPayload
(),
newMessage
)
if
err
!=
nil
{
...
...
@@ -35,7 +35,7 @@ func (s *singleReceiver) Callback(req *single.Request, receptionId receptionID.E
var
respondErr
error
if
cb
,
err
:=
s
.
endpoints
.
Get
(
URI
(
newMessage
.
GetUri
()),
Method
(
newMessage
.
GetMethod
()));
err
==
nil
{
// Send the payload to the proper Callback if it exists
// Send the payload to the proper Callback if it exists
and respond with the result
respondErr
=
respond
(
cb
(
newMessage
),
req
)
}
else
{
// If no callback, automatically send an error response
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment