summary refs log tree commit diff
path: root/src/api/routes/budgetRoutes.js
blob: 1cebffea4ec0a70c3b5f701ff8e36d1734b69da2 (plain) (blame)
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
46
import {
    requireMonitor,
    requireUser,
    validateAuth
} from '#api/middlewares/index.js';
import { UserType } from '#db/schemas/index.js';
import { RouteDescription, RouteMethod } from '#api/RouteDescription.js';

/**
 * @type {RouteDescription}
 */
export const getBudgetByUserRoute = {
    path: '/budget/:id',
    methods: {
        get: new RouteMethod({
            middlewares: [requireMonitor],
            async method(req, res) {}
        })
    }
};

/**
 * @type {RouteDescription}
 */
export const addBudgetByUserRoute = {
    path: '/budget/:id/add',
    methods: {
        get: new RouteMethod({
            middlewares: [requireMonitor],
            async method(req, res) {}
        })
    }
};

/**
 * @type {RouteDescription}
 */
export const getBudgetRoute = {
    path: '/budget/@me',
    methods: {
        get: new RouteMethod({
            middlewares: [requireUser],
            async method(req, res) {}
        })
    }
};