~cypheon/nextcloud-chores-app

ref: d19a6603c01e63c7545582e5ff313ef4aec0bf9f nextcloud-chores-app/appinfo/routes.php -rw-r--r-- 1.5 KiB
d19a6603 — Johann Rudloff Make overdue sidebar badge dynamic, switch badges to `CounterBubble` component 6 months ago
                                                                                
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
<?php
/**
 * Create your routes in here. The name is the lowercase name of the controller
 * without the controller part, the stuff after the hash is the method.
 * e.g. page#index -> OCA\Chores\Controller\PageController->index()
 *
 * The controller class has to be registered in the application.php file since
 * it's instantiated in there
 */
return [
  'routes' => [
    ['name' => 'Page#index', 'url' => '/', 'verb' => 'GET'],

    // Team Management
    ['name' => 'API#getTeam', 'url' => '/api/v1.0/team', 'verb' => 'GET'],
    ['name' => 'API#createTeam', 'url' => '/api/v1.0/team', 'verb' => 'POST'],
    ['name' => 'API#inviteUserToTeam', 'url' => '/api/v1.0/team/{teamId}/invites', 'verb' => 'POST'],

    // Account
    ['name' => 'API#getOwnTeam', 'url' => '/api/v1.0/account/team', 'verb' => 'GET'],
    ['name' => 'API#getOwnInvitations', 'url' => '/api/v1.0/account/invites', 'verb' => 'GET'],
    ['name' => 'API#acceptInvitation', 'url' => '/api/v1.0/account/invites/accept', 'verb' => 'POST'],

    ['name' => 'API#getChores', 'url' => '/api/v1.0/team/{teamId}/chores', 'verb' => 'GET'],
    ['name' => 'API#postChores', 'url' => '/api/v1.0/team/{teamId}/chores', 'verb' => 'POST'],
    ['name' => 'API#patchChore', 'url' => '/api/v1.0/team/{teamId}/chores/{choreId}', 'verb' => 'PATCH'],

    ['name' => 'API#getWorklog', 'url' => '/api/v1.0/team/{teamId}/work', 'verb' => 'GET'],
    ['name' => 'API#submitWork', 'url' => '/api/v1.0/team/{teamId}/work', 'verb' => 'POST'],
  ]
];