Sven
Sven
Explore posts from servers
WWasp-lang
Created by Sven on 12/2/2024 in #đŸ™‹questions
When switching tab i get logged uit
When switching tab on my prod site i get logged out and have to log back in again. this happens every tab switch.
12 replies
WWasp-lang
Created by Sven on 12/1/2024 in #đŸ™‹questions
I changed the name of my app and some domain settings
Does chaning the name of my app result in loss of database entries in development and also in production? When i changed this i got this error:
[ Server ] GET /auth/me 500 13.951 ms - 1330
[ Server!] PrismaClientKnownRequestError:
[ Server!] Invalid prisma.session.findUnique() invocation:
[ Server!]
[ Server!]
[ Server!] The table public.Session does not exist in the current database.
[ Server ] GET /auth/me 500 13.951 ms - 1330
[ Server!] PrismaClientKnownRequestError:
[ Server!] Invalid prisma.session.findUnique() invocation:
[ Server!]
[ Server!]
[ Server!] The table public.Session does not exist in the current database.
This is what i changed:
app NAME {
wasp: {
version: "^0.14.0"
},
app NAME {
wasp: {
version: "^0.14.0"
},
I fixed the error with wasp db migrate-dev but now my whole dev database is empy and i am scared this will also happen in my production.
18 replies
WWasp-lang
Created by Sven on 12/1/2024 in #đŸ™‹questions
Change server url
Hi how could i change the server url to which the client makes requests now? I setup a custom domain and want the client to use my custom server domain instead of the .fly.dev
10 replies
WWasp-lang
Created by Sven on 11/28/2024 in #đŸ™‹questions
I want to add a row to another model when a user signs up besides User
How could i add another row to another model related to the User model when a user signs up succesfully. I wnat to do this whenever the row for a user is created
7 replies
WWasp-lang
Created by Sven on 11/28/2024 in #đŸ™‹questions
Presistent job in background
Is it a bad habbit to have a presistent job running in the background that gets some information from a third party endpoint for a user. This job would retrieve any new orders for each user and updates it in the dashboard such that it is up to date and realtime. If it is not a bad practise how would i best do this, also how can i see the impact of this on the server.
13 replies
WWasp-lang
Created by Sven on 11/28/2024 in #đŸ™‹questions
Help with domain and server/client url
I have the domain coolthing.nl now when i add this custom domain using fly.io what does the server and client url change to? Right now it is: https://coolthing-server.fly.dev and https://coolthing-client.fly.dev But for my other programs and apps that interact with the server i need to know what the server url becomes when changing the domain to coolthing.com
78 replies
WWasp-lang
Created by Sven on 11/27/2024 in #đŸ™‹questions
How can i check size of my fly.io database size?
In fly I want to know how I can see the size of my fly.io database postgres. Like how much % of size is taken already I know not really wasp related but i know some people understnad this well and done it before.
4 replies
WWasp-lang
Created by Sven on 11/22/2024 in #đŸ™‹questions
subscriptionplan and status question
No description
14 replies
WWasp-lang
Created by Sven on 11/19/2024 in #đŸ™‹questions
I get error with the job geting daily stats
I get error when getting dailystats see below:
64 replies
WWasp-lang
Created by Sven on 11/18/2024 in #đŸ™‹questions
Upgrade memory of fly.io database
I know this maybe is not the place to ask but what is best practice for upgrading memory of fly.io database postgres? I right now have 223 mb but it somehtimes runs out of this, so maybe adding like 1gb is good? any tips on how to do this?
6 replies
WWasp-lang
Created by Sven on 11/14/2024 in #đŸ™‹questions
Do i need to set client env vars every deploy?
when i deploy an update to fly do i need to set the client env vars again? every deploy
15 replies
PPrisma
Created by Sven on 11/11/2024 in #help-and-questions
Help Needed with sorting/filtering data over Timeframe Based on Aggregated results
I'm working on a feature that involves querying daily event data and aggregating metrics over a specified timeframe (e.g., last 30 days or 90 days) for each event. Based on these aggregates, I need to filter and sort the events according to certain thresholds, such as total revenue or average price within the selected timeframe. Here’s a more detailed breakdown of my issue: Data Structure: Events table: Stores information about each event, like its name and category. EventData table: Contains daily metrics for each event, including: totalRevenue: Total revenue generated by the event on a given day. totalTicketsSold: Total tickets sold on that day. avgTicketPrice: Average ticket price for that day. eventDate: The date of the event metrics. The Events table has a relation to EventData, where EventData holds the daily details. Query for all events within a given timeframe (e.g., last 30 or 90 days). For each event, I need to aggregate the totalRevenue, totalTicketsSold, and avgTicketPriceover the timeframe. Apply filters on these aggregated values. For example: Only retrieve events where the sum of totalRevenue in the timeframe is between a specified minimum and maximum. Similarly, apply filters for totalTicketsSold and avgTicketPrice (where avgticketprice is average price over that timeframe) based on specified thresholds. Finally, sort the results based on one of these aggregate fields (e.g., sort by totalRevenuein descending order). Challanges im facing Filtering on Aggregated Data: I need to filter events based on the sum or average of fields in EventData over the specified timeframe. For example, filtering events with a total revenue between 1000 and 5000 within the last 30 days. Sorting: I want to sort the filtered results based on these aggregated values (e.g., total revenue or average ticket price).
5 replies
WWasp-lang
Created by Sven on 11/10/2024 in #đŸ™‹questions
Large database results in long data loading on frontend
What is a good way to sort and or filter data from a database table that is pretty large? Right now it takes a lot of time. When a user goes to the page that will show this data paginated it queries the database but the method i use now takes pretty long. Is there any efficient sort/filter algoritm i should use with postgres in order to reduce this time?
44 replies
WWasp-lang
Created by Sven on 11/7/2024 in #đŸ™‹questions
Good way of adding a search to a prisma table
What is the best practise of making a query that searches a string on a database table. For example i have a field name and when a user searches that on the frontend i want a query to search this name in a table under field name. What are best practises
7 replies
WWasp-lang
Created by Sven on 11/2/2024 in #đŸ™‹questions
Context.user is null
{ [ Server ] user: null, [ Server ] entities: { ..... [ Server ] } My context.user is null. HOw come this?
10 replies
WWasp-lang
Created by Sven on 11/1/2024 in #đŸ™‹questions
I want to return a 401 status on an action when a certain error occurs
Hi kapa, i want to return a response of 401 when a certain action fails. In my case my action fetches some information from an external API but when this fails with a 401 status i want to also return a 401 status to the client.
const response = await axios.post(tokenUrl, {}, { headers });
if (response.status === 401) {
throw new HttpError(401, 'Bs');
}
const response = await axios.post(tokenUrl, {}, { headers });
if (response.status === 401) {
throw new HttpError(401, 'Bs');
}
Right now i do the following above but it throws the error but does still return a 200 to the client.
13 replies
WWasp-lang
Created by Sven on 10/29/2024 in #đŸ™‹questions
How can i set a client side env var for production on fly
How can i set a client side env var for production on fly? I already deployed so i need to set it .
12 replies
WWasp-lang
Created by Sven on 10/28/2024 in #đŸ™‹questions
304 error on auth/me after signing up
Kapa when i signed up and try to access a page for which authRequired is set to True. I can't access page and auth/me returns a 304 status.
10 replies
WWasp-lang
Created by Sven on 10/27/2024 in #đŸ™‹questions
Production payment doesn't give user subscription
No description
71 replies
WWasp-lang
Created by Sven on 10/21/2024 in #đŸ™‹questions
where can i edit login and signup pages?
kapa where can i edit login and signup page? i want to edit the button colors and main texts
12 replies