mirror of
https://github.com/zkldi/Tachi.git
synced 2026-09-30 02:48:01 +03:00
Update permissions to their new names
This commit is contained in:
@@ -22,8 +22,7 @@ export const AllPermissions: Record<APIPermissions, true> = {
|
||||
customise_session: true,
|
||||
customise_score: true,
|
||||
delete_score: true,
|
||||
set_goals: true,
|
||||
unset_goals: true,
|
||||
manage_targets: true,
|
||||
};
|
||||
|
||||
export const SetRequestPermissions: RequestHandler = CreateSetRequestPermissions("description");
|
||||
|
||||
+2
-2
@@ -68,7 +68,7 @@ type GoalCreationBody = Pick<GoalDocument, "charts" | "criteria">;
|
||||
router.post(
|
||||
"/add-goal",
|
||||
RequireAuthedAsUser,
|
||||
RequirePermissions("set_goals"),
|
||||
RequirePermissions("manage_targets"),
|
||||
prValidate({
|
||||
criteria: {
|
||||
key: p.isIn(
|
||||
@@ -247,7 +247,7 @@ router.delete(
|
||||
"/:goalID",
|
||||
RequireAuthedAsUser,
|
||||
GetGoalSubscription,
|
||||
RequirePermissions("unset_goals"),
|
||||
RequirePermissions("manage_targets"),
|
||||
prValidate({ goalID: "string" }),
|
||||
async (req, res) => {
|
||||
const goalID = req.params.goalID;
|
||||
|
||||
Reference in New Issue
Block a user