Add API Key auth mode support for v1/workspace

This commit is contained in:
Tuan Dang
2023-06-22 17:53:09 +07:00
parent 8f119fbdd3
commit ffd4655e2f
+2 -1
View File
@@ -8,6 +8,7 @@ import {
} from "../../middleware"; } from "../../middleware";
import { import {
ADMIN, ADMIN,
AUTH_MODE_API_KEY,
AUTH_MODE_JWT, AUTH_MODE_JWT,
MEMBER, MEMBER,
} from "../../variables"; } from "../../variables";
@@ -44,7 +45,7 @@ router.get(
router.get( router.get(
"/", "/",
requireAuth({ requireAuth({
acceptedAuthModes: [AUTH_MODE_JWT], acceptedAuthModes: [AUTH_MODE_JWT, AUTH_MODE_API_KEY],
}), }),
workspaceController.getWorkspaces workspaceController.getWorkspaces
); );