Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Pixel Humain
api
Commits
cbc3d7d3
Commit
cbc3d7d3
authored
Feb 25, 2019
by
Tony Emma
Browse files
Modification du controleur activitycontroller et l'action actoraction
parent
e0b2a997
Changes
3
Show whitespace changes
Inline
Side-by-side
components/ApiController.php
View file @
cbc3d7d3
...
...
@@ -35,8 +35,7 @@ class ApiController extends Controller
),
"activitypub"
=>
array
(
"get"
=>
array
(
"href"
=>
"/ph/api/activitypub/get"
,
"public"
=>
true
),
"actor"
=>
array
(
"href"
=>
"/ph/api/abc/person/actor"
,
"public"
=>
true
),
"webfinger"
=>
array
(
"href"
=>
"/.well-known/webfinger"
,
"public"
=>
true
)
"actor"
=>
array
(
"href"
=>
"/ph/api/abc/person/actor"
,
"public"
=>
true
)
),
"organization"
=>
array
(
"get"
=>
array
(
"href"
=>
"/ph/api/organization/get"
,
"public"
=>
true
),
...
...
controllers/ActivitypubController.php
View file @
cbc3d7d3
...
...
@@ -12,7 +12,6 @@ class ActivitypubController extends ApiController {
return
array
(
'get'
=>
'api.controllers.activitypub.GetAction'
,
'actor'
=>
'api.controllers.activitypub.ActorAction'
,
'webfinger'
=>
'api.controllers.activitypub.WebfingerAction'
);
}
...
...
controllers/activitypub/ActorAction.php
View file @
cbc3d7d3
<?php
class
ActorAction
extends
CAction
{
public
function
run
(
$id
=
null
,
$format
=
null
,
$limit
=
1
,
$index
=
0
,
$tags
=
null
,
$multiTags
=
null
,
$key
=
null
,
$insee
=
null
)
{
public
function
run
(
$id
=
null
,
$format
=
"activityStream"
,
$limit
=
1
,
$index
=
0
,
$tags
=
null
,
$multiTags
=
null
,
$key
=
null
,
$insee
=
null
)
{
$controller
=
$this
->
getController
();
$bindMap
=
(
!
empty
(
$id
)
?
TranslateActivityStream
::
$dataBinding_actor
:
null
);
...
...
@@ -8,7 +9,7 @@ class ActorAction extends CAction{
$result
=
Api
::
getData
(
$bindMap
,
$format
,
Citoyen
::
COLLECTION
,
$id
,
$limit
,
$index
,
$tags
,
$multiTags
,
$key
,
$insee
);
Rest
::
json
(
$result
[
'entities'
][
$id
]);
Rest
::
json
(
$result
[
'entities'
][
$id
]
,
null
,
true
,
'application/activity+json; charset=utf-8'
);
Yii
::
app
()
->
end
();
}
...
...
Write
Preview
Supports
Markdown
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