npm install
dotnet run
To add a secret run where <SECRET>
is the name of the secret and <VALUE>
is the actual value
dotnet user-secrets set "<SECRET>" "<VALUE>"
If you want to check the secrets you've already set you can run
dotnet user-secrets list
There is a high chance you will need info from a backend API route that requires authorization - for that you will need to use Auth API.
import { UserContext, authApi } from '../contexts/UserProvider';
const [user, setUser] = useContext(UserContext);
authApi(user).get(<url>)
authApi(user).post(<url>, <body>)
It is important that <body>
matches the database modelauthApi(user).post(<url>, <body>, "DELETE")
only the unique identifier fields are enough to provide in <body>
. These fields can vary but the usual one is "id"
*upsert: check if an entry with the unique identifier exists in the database -> if so, update with provided data; otherwise create a new entry in the database using provided data