-
Notifications
You must be signed in to change notification settings - Fork 2
/
main.wasp
45 lines (38 loc) · 884 Bytes
/
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
app stripeTemplate {
wasp: {
version: "^0.9.0"
},
title: "stripe-template",
auth: {
userEntity: User,
methods: {
usernameAndPassword: {}
},
onAuthFailedRedirectTo: "/login"
},
dependencies: [
("stripe", "^11.14.0"),
]
}
route RootRoute { path: "/", to: MainPage }
page MainPage {
authRequired: true,
component: import Main from "@client/MainPage.jsx"
}
route SignupRoute { path: "/signup", to: SignupPage }
page SignupPage {
component: import Signup from "@client/SignupPage"
}
route LoginRoute { path: "/login", to: LoginPage }
page LoginPage {
component: import Login from "@client/LoginPage"
}
entity User {=psl
id Int @id @default(autoincrement())
username String @unique
password String
psl=}
action createCharge {
fn: import { createCharge } from "@server/actions.js",
entities: []
}