-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.ts
23 lines (22 loc) · 886 Bytes
/
app.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
const config = {
static: true,
host: `https://www.aland20.com`,
allowedOrigins: ['https://www.aland20.com', 'https://aland20.com'],
// host: `http://localhost:3000`,
// allowedOrigins: ['localhost:3000', 'http://localhost:3000'],
api: {
contact: () => `${config.host}/api/contact`,
sessions: {
user: (token: string) => `${config.host}/api/sessions/users/${token}`,
},
admin: {
all: (model: string) => `${config.host}/api/admin/${model}`,
show: (model: string, id) => `${config.host}/api/admin/${model}/${id}`,
store: (model: string) => `${config.host}/api/admin/${model}/store`,
update: (model: string, id) => `${config.host}/api/admin/${model}/${id}`,
destroy: (model: string, id) => `${config.host}/api/admin/${model}/${id}`,
export: () => `${config.host}/api/admin/export`,
},
},
};
export default config;