Add isAdmin field to user
And use middleware to get the session id and set user id to ctx for later admin checks. Add a GetIsAdminStatus func to DB and a helper func to check it.
A simple project by Kaare
And use middleware to get the session id and set user id to ctx for later admin checks. Add a GetIsAdminStatus func to DB and a helper func to check it.