Jorge
WWasp
•Created by Jorge on 1/11/2025 in #🙋questions
Rename DB column and migrate its data
Using prisma I had a column "balance" that I renamed "startBalance", and added a new one "currentBalance":
The previous model:
model TradingSession {
id String @id @default(uuid())
createdAt DateTime @default(now())
...
balance Int
...
}
model TradingSession {
id String @id @default(uuid())
createdAt DateTime @default(now())
...
startBalance Int
currentBalance Int
...
}
How to handle migration of existing data for column balance to startBalance ?
6 replies
WWasp
•Created by Jorge on 1/6/2025 in #🙋questions
User last active timestamp
I'm trying to understand how is updated lastActiveTimestamp in user table.
Thanks for your help
20 replies
WWasp
•Created by Jorge on 12/9/2024 in #🙋questions
Custom API issue
Trying to implement a custom API, but I'm getting a html as response and the logs are not print in the console.
In main.wasp:
api getChart {
fn: import { getChart } from "@src/server/api/charts",
httpRoute: (GET, "/api/charts"),
//entities: [Chart],
// auth: true
}
In charts.ts:
import { GetChart } from "wasp/server/api";
export const getChart: GetChart = (req, res) => {
console.log("getChart");
console.log("Request params:", req.params);
};
52 replies
WWasp
•Created by Jorge on 12/9/2024 in #🙋questions
Customize loading screen background color
Hi everyone,
Is there a straightforward way to customize the background color of loading screen (for protected routes, I guess)? It's currently white and, as I'm using dark/light modes, I would like to align this on the current theme.
The part of code concerned seems to be this one:
const createAuthRequiredPage = (Page) => {
return (props) => {
const { data: user, status, error } = useAuth()
switch (status) {
case 'success':
if (user) {
return <Page {...props} user={user} />
} else {
return <Redirect to="/login" />
}
case 'loading':
return (
<FullPageWrapper className="wasp-auth-required-loader-wrapper">
<Loader />
</FullPageWrapper>
)
case 'error':
return (
<FullPageWrapper className="wasp-auth-required-error-wrapper">
<MessageError subtitle={<small>Details: {error.message}</small>}>
Failed to load user data. Try refreshing the page.
</MessageError>
</FullPageWrapper>
)
}
}
}
12 replies
WWasp
•Created by Jorge on 10/8/2024 in #🙋questions
Local file access in Query
Is it possible to read a local file in a query implementation defined in operations.ts ?
25 replies
WWasp
•Created by Jorge on 9/22/2024 in #🙋questions
Open Saas template update
Hi team,
I have the following questions:
• How can I find out which version of the Open SaaS template is used in my project?
• Is there a straightforward way to migrate from a previous version of the template to the new one?
9 replies
WWasp
•Created by Jorge on 9/20/2024 in #🙋questions
Plan switching not reflected in the database
6 replies
WWasp
•Created by Jorge on 9/19/2024 in #🙋questions
Access to Manage Subscription
I’m getting an error when I try to click on the ‘Manage Subscription’ link (in Account Information). Apparently, the variable REACT_APP_STRIPE_CUSTOMER_PORTAL is missing in my .env.server. I cannot find related information in the current documentation. Thanks for your help.
18 replies
WWasp
•Created by Jorge on 9/9/2024 in #🙋questions
Open Saas - Login/Signup forms with shadcn ui
Hi everyone,
What's the most straightforward way to update the existing forms using shadcn ui?
7 replies
WWasp
•Created by Jorge on 9/5/2024 in #🙋questions
Tailwindui theme
Hi all,
I'm struggling to install this theme https://tailwindui.com/templates/catalyst on a wasp project (open-saas.sh more specifically), and I have a lot of errors.
Do you think, Is it possible to do it?
13 replies