constants.ts

1/* @DOCS-IGNORE */
2
3const packageJson = require('../package.json');
4
5const constants = {
6	/**
7	 * The ID of the app. This is used to create the app data directory.
8	 */
9	APP_ID: 'dev.0x7ffed9b08230.image-uploader',
10	/**
11	 * The name of the app.
12	 */
13	APP_NAME: 'Media Uploader',
14	/**
15	 * The version of the app.
16	 */
17	APP_VERSION: packageJson.version || '0.0.0',
18	/**
19	 * The user agent of the main website
20	 */
21	USER_AGENT: 'Image-Uploader',
22
23	/**
24	 * Routes to not rate limit
25	 */
26	NO_RATE_LIMIT_ROUTES: [
27		{
28			method: 'GET',
29			route: '/view',
30		},
31		{
32			method: 'GET',
33			route: '/login',
34		},
35		{
36			method: 'GET',
37			route: '/register',
38		},
39		{
40			method: 'GET',
41			route: '/avatars',
42		},
43		{
44			method: 'GET',
45			route: '/admins',
46		},
47		{
48			method: 'GET',
49			route: '/settings',
50		},
51		{
52			method: 'POST',
53			route: '/settings',
54		},
55		{
56			method: 'GET',
57			route: '/api/get-media',
58		},
59	],
60};
61
62export default constants;
63