Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAJ documentation technique #2724

Merged
merged 5 commits into from
Dec 10, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix response to match API documentation
  • Loading branch information
jonathanfallon committed Dec 9, 2024
commit fa948d1d88dd8a98947c98820f15f164a617e536
4 changes: 2 additions & 2 deletions api/src/pdc/services/cee/helpers/getOperatorIdOrFail.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { ContextType, UnauthorizedException } from "@/ilos/common/index.ts";
import { ContextType, ForbiddenException } from "@/ilos/common/index.ts";

export function getOperatorIdOrFail(context: ContextType): number {
const { operator_id }: { operator_id: number } = context.call?.user || {};
if (!operator_id || Number.isNaN(operator_id)) {
throw new UnauthorizedException();
throw new ForbiddenException();
}
return operator_id;
}