fix: replace stale program references (#749)

This commit is contained in:
Rotimi Best
2026-07-13 02:09:57 +01:00
committed by GitHub
parent 484e4fb674
commit 5e8188fbd3
57 changed files with 524 additions and 533 deletions
+1 -1
View File
@@ -26,7 +26,7 @@ export const cohortMemberMiddleware = async (c: Context, next: Next) => {
return c.json(
{
success: false,
error: 'Program ID is required',
error: 'Cohort ID is required',
code: 'COHORT_ID_REQUIRED'
},
400
@@ -82,7 +82,7 @@ export const cohortNewsfeedCommentAuthorOrTeamMiddleware = async (c: Context, ne
return c.json(
{
success: false,
error: 'Only the author or program team members can perform this action',
error: 'Only the author or cohort team members can perform this action',
code: ErrorCodes.ORG_TEAM_NOT_AUTHORIZED
},
403
@@ -6,7 +6,7 @@ import { ROLE } from '@cio/utils/constants';
/**
* Middleware to check if the authenticated user is a cohort teacher or org admin.
* Mirrors the course-team-member pattern for program routes.
* Mirrors the course-team-member pattern for cohort routes.
*/
export const cohortTeamMemberMiddleware = async (c: Context, next: Next) => {
try {
@@ -27,7 +27,7 @@ export const cohortTeamMemberMiddleware = async (c: Context, next: Next) => {
return c.json(
{
success: false,
error: 'Program ID is required',
error: 'Cohort ID is required',
code: 'COHORT_ID_REQUIRED'
},
400
@@ -56,7 +56,7 @@ export const cohortTeamMemberMiddleware = async (c: Context, next: Next) => {
return c.json(
{
success: false,
error: 'Failed to verify program team membership',
error: 'Failed to verify cohort team membership',
code: 'COHORT_TEAM_MEMBER_CHECK_FAILED'
},
500