-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.wasp
78 lines (70 loc) · 1.68 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
74
75
76
77
78
app hackathonApp {
wasp: {
version: "^0.10.0"
},
db: {
system: PostgreSQL
},
title: "Wasp Hackathon #2",
emailSender: {
provider: SendGrid,
defaultFrom: {
name: "Wasp Hackathon #2",
email: "[email protected]"
},
},
dependencies: [
("react-feather", "2.0.10"),
("react-fast-marquee", "1.3.5"),
("@tailwindcss/forms", "^0.5.3"),
("@tailwindcss/typography", "^0.5.7")
]
}
entity Registration {=psl
email String @id @unique
name String
createdAt DateTime @default(now())
psl=}
entity Submission {=psl
email String @id @unique
name String @unique
github String
description String
twitter String?
country String?
website String?
image String?
approved Boolean @default(false)
noticeSent Boolean @default(false)
createdAt DateTime @default(now())
psl=}
route RootRoute { path: "/", to: MainPage }
page MainPage {
component: import Main from "@client/MainPage"
}
action submitProject {
fn: import { submitProject } from "@server/actions.js",
entities: [Submission, Registration]
}
action registerProject {
fn: import { registerProject } from "@server/actions.js",
entities: [Registration]
}
query getProjects {
fn: import { getProjects } from "@server/queries.js",
entities: [Submission]
}
query getParticipants {
fn: import { getParticipants } from "@server/queries.js",
entities: [Registration]
}
job notifyApprovedSubmissions {
executor: PgBoss,
perform: {
fn: import { checkSubmissionsAndSend } from "@server/workers.js"
},
schedule: {
cron: "0 * * * *" // checks every hour
},
entities: [Submission]
}