ibby
ibby
Explore posts from servers
CC#
Created by ibby on 4/30/2024 in #help
SignInAsync Set-Cookie header not working?
I had to set credentials: "include" in the fetch call
6 replies
CC#
Created by ibby on 4/29/2024 in #help
What should the service layer return back to a controller?
this is the Result Pattern right?
41 replies
CC#
Created by ibby on 4/29/2024 in #help
What should the service layer return back to a controller?
I think I've seen something like this before, ill check it out. Thanks!
41 replies
CC#
Created by ibby on 4/29/2024 in #help
What should the service layer return back to a controller?
This is what I was thinking at first with return a result. Everything false would mean success
public class CreateUserResult
{
public bool IsUsernameTaken { get; set; } // will map to a BadRequest()
public bool IsEmailAlreadyUsed { get; set; } // will map to a BadRequest()
public bool IsError { get; set; } // will map to a StatusCode(500)
}
public class CreateUserResult
{
public bool IsUsernameTaken { get; set; } // will map to a BadRequest()
public bool IsEmailAlreadyUsed { get; set; } // will map to a BadRequest()
public bool IsError { get; set; } // will map to a StatusCode(500)
}
41 replies
TTCTheo's Typesafe Cult
Created by Ivan on 4/16/2024 in #questions
How can I replicate the vanilla behavior of NextJS API routing in T3 stack?
You're mixing up pages & app router api routing Pages router: src/pages/api/locations.ts -> http://localhost:3000/api/locations App router: src/app/api/locations/route.ts -> http://localhost:3000/api/locations
4 replies
TTCTheo's Typesafe Cult
Created by ibby on 12/19/2023 in #questions
nextjs how to render serverside and then update data client-side based on a filter?
I guess I could take in params, get query string and do db call based on that but then the checkbox would be unchecked?
3 replies
TTCTheo's Typesafe Cult
Created by hyhy on 11/1/2023 in #questions
"inArray requires at least 1 value" error deleting files with uploadthing
You can't delete file using the URLs, you need the file key: utapi.deleteFiles("https://utfs.io/f/file-key-uuid.png");utapi.deleteFiles("file-key-uuid.png");
13 replies
TTCTheo's Typesafe Cult
Created by jingleflicks on 7/18/2023 in #questions
create.t3.gg seems to be down...can anyone else confirm?
yeah its down for me
13 replies