forked from GreenMeteor/humhub-RESTful-API
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.php
45 lines (42 loc) · 1.65 KB
/
config.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
namespace humhub\modules\api;
return [
'id' => 'api',
'class' => 'humhub\modules\api\Module',
'namespace' => 'humhub\modules\api',
'controllerNamespace' => 'humhub\modules\api',
'urlManagerRules' => [
['class' => 'humhub\modules\space\components\UrlRule'],
'GET api/user' => 'api/user',
'GET api/user/<id:\d+>' => 'api/user/view',
'GET api/user/search/<search:.+>' => 'api/user/search',
'GET api/user/login/<username:.+>/<password:.+>' => 'api/user/login',
'GET api/profile' => 'api/profile',
'GET api/profile/<id:\d+>' => 'api/profile/view',
'GET api/space' => 'api/space',
'GET api/post' => 'api/post',
'GET api/post/<id:\d+>' => 'api/post/view',
'POST api/post' => 'api/post/create',
'DELETE api/post/<id:\d+>' => 'api/post/delete',
'PUT,PATCH api/post/<id:\d+>' => 'api/post/update',
'GET api/comment' => 'api/comment',
'POST api/comment' => 'api/comment/create',
'GET api/comment/<id:\d+>' => 'api/comment/view',
'api/comment/post/<id:\d+>' => 'api/comment/post',
'DELETE api/comment/<id:\d+>' => 'api/comment/delete',
'PUT,PATCH api/comment/<id:\d+>' => 'api/comment/update',
'GET api/notification' => 'api/notification',
'GET api/notification/<id:\d+>' => 'api/notification/view',
],
'events' => [
[
'class' => \humhub\modules\admin\widgets\AdminMenu::className(),
'event' => \humhub\modules\admin\widgets\AdminMenu::EVENT_INIT,
'callback' => [
'humhub\modules\api\Events',
'onAdminMenuInit'
]
]
]
];
?>