File tree Expand file tree Collapse file tree
packages/web/src/app/api/(server)/agents/[agentId] Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -126,18 +126,18 @@ export const PATCH = apiHandler(async (request: NextRequest, { params }: RoutePa
126126 const effectiveScope = scope ?? existing . scope ;
127127
128128 // When scope changes to REPO/CONNECTION, IDs must be supplied
129- if ( effectiveScope === ' REPO' && scope === ' REPO' && ( ! repoIds || repoIds . length === 0 ) ) {
129+ if ( effectiveScope === AgentScope . REPO && scope === AgentScope . REPO && ( ! repoIds || repoIds . length === 0 ) ) {
130130 return {
131131 statusCode : StatusCodes . BAD_REQUEST ,
132- errorCode : ' INVALID_REQUEST_BODY' ,
132+ errorCode : ErrorCode . INVALID_REQUEST_BODY ,
133133 message : "repoIds is required when scope is REPO" ,
134134 } ;
135135 }
136136
137- if ( effectiveScope === ' CONNECTION' && scope === ' CONNECTION' && ( ! connectionIds || connectionIds . length === 0 ) ) {
137+ if ( effectiveScope === AgentScope . CONNECTION && scope === AgentScope . CONNECTION && ( ! connectionIds || connectionIds . length === 0 ) ) {
138138 return {
139139 statusCode : StatusCodes . BAD_REQUEST ,
140- errorCode : ' INVALID_REQUEST_BODY' ,
140+ errorCode : ErrorCode . INVALID_REQUEST_BODY ,
141141 message : "connectionIds is required when scope is CONNECTION" ,
142142 } ;
143143 }
You can’t perform that action at this time.
0 commit comments