-
Notifications
You must be signed in to change notification settings - Fork 22
Reportback items endpoint #5055
Changes from 1 commit
0a07294
c76304d
3be9fed
5a2beb6
a33aaa9
4206867
79b8519
bc66055
74c1967
7848854
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -115,17 +115,15 @@ private function build($data) { | |
| 'verb' => $data->verb, | ||
| ], | ||
| ]; | ||
| // call northstar dosomething_helpers_get_northstar_user(); | ||
| // $northstar_user = dosomething_helpers_get_northstar_user(); | ||
|
|
||
| // call northstar dosomething_northstar_get_northstar_user(); | ||
| $northstar_user = dosomething_northstar_get_northstar_user($data->fid); | ||
| $northstar_user = dosomething_northstar_get_northstar_user($data->uid); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can you
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. updated! |
||
|
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not vital at all (or maybe just a future update to consider), but might be cleaner if you could save the nested array to $northstar_user = json_decode($northstar_user->data, true);
$northstar_user = (object) $northstar_user['data'][0];So then you can get each item similar to how code above retrieves it for consistency: $this->user = [
'id' => $data->uid,
'first_name' => $northstar_user->first_name,
'last_name' => $northstar_user->last_name,
'photo' => $northstar_user->photo,
'country' => $northstar_user->country,
];Something like that... :)
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. that looks a lot better, I'll update now, thanks Diego! |
||
| $this->user = [ | ||
| 'id' => $data->uid, | ||
| // 'first_name' => $northstar_user->first_name, | ||
| // 'last_name' => $northstar_user->last_name, | ||
| // 'country' =>$northstar_user->country, | ||
| 'first_name' => json_decode($northstar_user->data, true)['data'][0]['first_name'], | ||
| 'last_name' => json_decode($northstar_user->data, true)['data'][0]['last_name'], | ||
| 'photo' => json_decode($northstar_user->data, true)['data'][0]['photo'], | ||
| 'country' => json_decode($northstar_user->data, true)['data'][0]['country'], | ||
| ]; | ||
| } | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was
NORTSTAR_URLnot working locally?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the URL was sending me to qa instead of local where I wanted to test but looks good now so I'll change back!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually changed this back - right now, the $base_url prints
http://northstar.dev:8000where as before, it printedhttp://northstar-qa.dosomething.org:8000. Is this ok?