-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
main.wasp
74 lines (58 loc) · 1.39 KB
/
main.wasp
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
app waspello {
wasp: {
version: "^0.14.0"
},
title: "Waspello",
auth: {
userEntity: User,
methods: {
usernameAndPassword: {},
google: {}
},
onAuthFailedRedirectTo: "/login"
}
}
route MainRoute { path: "/", to: Main }
page Main {
authRequired: true,
component: import Main from "@src/cards/MainPage.jsx"
}
route SignupRoute { path: "/signup", to: Signup }
page Signup {
component: import Signup from "@src/auth/SignupPage.jsx"
}
route LoginRoute { path: "/login", to: Login }
page Login {
component: import Login from "@src/auth/LoginPage.jsx"
}
// ------------------- Queries and actions
query getListsAndCards {
fn: import { getListsAndCards } from "@src/cards/lists.js",
entities: [List, Card]
}
// Lists
action createList {
fn: import { createList } from "@src/cards/lists.js",
entities: [List]
}
action updateList {
fn: import { updateList } from "@src/cards/lists.js",
entities: [List]
}
action deleteList {
fn: import { deleteList } from "@src/cards/lists.js",
entities: [List, Card]
}
action createListCopy {
fn: import { createListCopy } from "@src/cards/lists.js",
entities: [List, Card]
}
// Cards
action createCard {
fn: import { createCard } from "@src/cards/cards.js",
entities: [Card]
}
action updateCard {
fn: import { updateCard } from "@src/cards/cards.js",
entities: [Card]
}