Good morning everyone. Playing around with the 2.0...
# orm-help
d
Good morning everyone. Playing around with the 2.0 version and I'd like to have my 'post' object dealt with in a single file that provides the GET, POST, etc with and without the :id parameter. Poking around documentation I can't find a good reference in how to do that. Would anyone happen to have a link or example on how these features https://github.com/prisma/prisma-examples/tree/master/typescript/rest-nextjs/pages/api/post could be put into a single .ts file. Or am I going down a bad path and if bad a bit of explanation would help me as I prefer all operations on an object to be single file.
Ah so the simple solution is simply change the URL to use http://localhost/api/post?id=1. Can then have the single file and optional parameter passing
👍 1