wasp/examples/waspello/main.wasp

75 lines
1.4 KiB
JavaScript
Raw Normal View History

app waspello {
wasp: {
2024-10-04 14:53:34 +03:00
version: "^0.15.0"
},
title: "Waspello",
2021-07-05 19:08:13 +03:00
auth: {
2021-07-05 19:08:13 +03:00
userEntity: User,
methods: {
usernameAndPassword: {},
google: {}
},
2021-07-05 19:08:13 +03:00
onAuthFailedRedirectTo: "/login"
2024-03-11 00:56:58 +03:00
}
2021-07-05 19:08:13 +03:00
}
route MainRoute { path: "/", to: Main }
2021-07-05 19:08:13 +03:00
page Main {
authRequired: true,
2024-03-11 00:56:58 +03:00
component: import Main from "@src/cards/MainPage.jsx"
2021-07-05 19:08:13 +03:00
}
route SignupRoute { path: "/signup", to: Signup }
2021-07-05 19:08:13 +03:00
page Signup {
2024-03-11 00:56:58 +03:00
component: import Signup from "@src/auth/SignupPage.jsx"
2021-07-05 19:08:13 +03:00
}
route LoginRoute { path: "/login", to: Login }
2021-07-05 19:08:13 +03:00
page Login {
2024-03-11 00:56:58 +03:00
component: import Login from "@src/auth/LoginPage.jsx"
2021-07-05 19:08:13 +03:00
}
// ------------------- Queries and actions
query getListsAndCards {
2024-03-11 00:56:58 +03:00
fn: import { getListsAndCards } from "@src/cards/lists.js",
2021-07-05 19:08:13 +03:00
entities: [List, Card]
}
// Lists
action createList {
2024-03-11 00:56:58 +03:00
fn: import { createList } from "@src/cards/lists.js",
2021-07-05 19:08:13 +03:00
entities: [List]
}
action updateList {
2024-03-11 00:56:58 +03:00
fn: import { updateList } from "@src/cards/lists.js",
2021-07-05 19:08:13 +03:00
entities: [List]
}
action deleteList {
2024-03-11 00:56:58 +03:00
fn: import { deleteList } from "@src/cards/lists.js",
2021-07-05 19:08:13 +03:00
entities: [List, Card]
}
action createListCopy {
2024-03-11 00:56:58 +03:00
fn: import { createListCopy } from "@src/cards/lists.js",
entities: [List, Card]
}
2021-07-05 19:08:13 +03:00
// Cards
action createCard {
2024-03-11 00:56:58 +03:00
fn: import { createCard } from "@src/cards/cards.js",
2021-07-05 19:08:13 +03:00
entities: [Card]
}
action updateCard {
2024-03-11 00:56:58 +03:00
fn: import { updateCard } from "@src/cards/cards.js",
2021-07-05 19:08:13 +03:00
entities: [Card]
}