fred-123
fred-123
WWasp
Created by fred-123 on 2/25/2025 in #🙋questions
Can the wasp db studio command be altered to take the connection string directly?
You are right. That works. For some reason I though the install was all inside the "wasp new" command. Didn't even cross my mind that I can just curl wasp for some reason. Too much coffee or to little coffee. We will never know. Thanks for the help!
11 replies
WWasp
Created by fred-123 on 2/25/2025 in #🙋questions
Can the wasp db studio command be altered to take the connection string directly?
I think thats the catch. Installing wasp requires docker to work. The Computer where i have this issue can't instal wasp since it can't do Virtualization of any type. But i should be able to use something like PgAdmin4 to connect to the db directly right?
11 replies
WWasp
Created by fred-123 on 2/25/2025 in #🙋questions
Can the wasp db studio command be altered to take the connection string directly?
i still get this when i run it: app/main.wasp @ 34:17-20 Type error: Undefined identifier: User 33 | auth: { 34 | userEntity: User, 35 | methods: { ❌ --- [Error] Compilation of wasp project failed: -------------------------------- 1 errors found Just to clarify. On this machine i have never run wasp start or any command like this as it doesn't work.
11 replies
WWasp
Created by fred-123 on 2/17/2025 in #🙋questions
Migrate found failed migrations in the target database (Error: P3009)
Thats all i needed. Its fixed.
11 replies
WWasp
Created by fred-123 on 2/17/2025 in #🙋questions
Migrate found failed migrations in the target database (Error: P3009)
@kapa.ai these migrations failed: 20250214134902_: This migration failed due to a unique index constraint violation on the User table. Specifically, the subscriptionTier column already has a value "tester" which is being duplicated. The database error code is 23505. 20250215185723_reset_db_locally_15_2_25: This migration failed because a relation (table) named "User" already exists. The database error code is 42P07. This likely means the migration is trying to create the User table again, but it's already there (possibly from a previous migration, even if that previous migration failed later).
11 replies
WWasp
Created by fred-123 on 2/13/2025 in #🙋questions
Does datePaid in the DB get popuplated with the payment date OOTB with opensaas?
Yes thank you!
7 replies
WWasp
Created by Flictum on 7/24/2024 in #🙋questions
Translation
@martinsos is translation of the auth forms possible now?
14 replies
WWasp
Created by fred-123 on 7/1/2024 in #🙋questions
How to create a custom API Endpoint to check subscriptionStatus and subscriptionTier
Does that answer your question?
71 replies
WWasp
Created by fred-123 on 7/1/2024 in #🙋questions
How to create a custom API Endpoint to check subscriptionStatus and subscriptionTier
@kapa.ai How to secure an api endpoint in wasp 0.14 with jwt tokens?
71 replies
WWasp
Created by fred-123 on 7/1/2024 in #🙋questions
How to create a custom API Endpoint to check subscriptionStatus and subscriptionTier
just do it the proper way with JWT tokens and you should be fine
71 replies
WWasp
Created by fred-123 on 7/1/2024 in #🙋questions
How to create a custom API Endpoint to check subscriptionStatus and subscriptionTier
yeah i do.
71 replies
WWasp
Created by fred-123 on 7/1/2024 in #🙋questions
How to create a custom API Endpoint to check subscriptionStatus and subscriptionTier
At least when still building an MVP i don't think this is that relevant just yet. But of course you could make it safer and I am sure there are plenty of resources out there on a hundred ways of building it more robust.
71 replies
WWasp
Created by fred-123 on 7/1/2024 in #🙋questions
How to create a custom API Endpoint to check subscriptionStatus and subscriptionTier
why would you care if somebody else uses the endpoint? they can only retrieve subscription status and tier if they know the email address already and that informatoin isn't really that sensitive.
71 replies
WWasp
Created by fred-123 on 7/1/2024 in #🙋questions
How to create a custom API Endpoint to check subscriptionStatus and subscriptionTier
Are you testing with postman? What errors are you getting? Are you sure you are checking the correct db and that the user is actually present?
71 replies
WWasp
Created by fred-123 on 7/1/2024 in #🙋questions
How to create a custom API Endpoint to check subscriptionStatus and subscriptionTier
regarding the endpoint. Most likely you are working locally so it would be this for you if you use that port: http://localhost:3001/auth/email/login Make sure you call on port 3001 which is the server and not on 3000 which is the client
71 replies
WWasp
Created by fred-123 on 7/1/2024 in #🙋questions
How to create a custom API Endpoint to check subscriptionStatus and subscriptionTier
just share your code in a new thread and i am sure somebody will be happy to point you in the correct direction.
71 replies
WWasp
Created by fred-123 on 7/1/2024 in #🙋questions
How to create a custom API Endpoint to check subscriptionStatus and subscriptionTier
just use something like postman to test it.
71 replies
WWasp
Created by fred-123 on 7/1/2024 in #🙋questions
How to create a custom API Endpoint to check subscriptionStatus and subscriptionTier
you have to call https://[your-server-url].fly.dev/auth/email/login I have set up a login screen where the usere enters the email and password. The info is then passed to the api endpoint for auth to check if it's an existing user. In the same function that does this auth part I save the useres email address that was used to log in into the users browser storage. That email address is then used to to check the subscription status and subscription tier: app/src/server/api/getUserSubscriptionInfo.js import { HttpError } from 'wasp/server'; export async function getUserSubscriptionInfo(req, res, context) { const email = req.query.email; console.log('Received email:', email); // Debugging line if (!email) { throw new HttpError(400, 'Email is required'); } const user = await context.entities.User.findUnique({ where: { email: email } }); console.log('Queried user:', user); // Debugging line if (!user) { throw new HttpError(404, 'User not found'); } const { subscriptionTier, subscriptionStatus } = user; res.json({ subscriptionTier, subscriptionStatus }); } Then you just do some basic conditional statements to set up the logic what the users is meant to have access to or not
71 replies
WWasp
Created by fred-123 on 7/1/2024 in #🙋questions
How to create a custom API Endpoint to check subscriptionStatus and subscriptionTier
I am not sure anymore if i had to set up a custom endpoint for it or if it was already there
71 replies
WWasp
Created by fred-123 on 7/1/2024 in #🙋questions
How to create a custom API Endpoint to check subscriptionStatus and subscriptionTier
just call the api and pass it to wherever you need it in your script
71 replies