Wrong task ID length check

This commit is contained in:
Jonathan Barrow
2023-08-25 22:37:43 -04:00
parent 0c14391df8
commit bed0c87263
3 changed files with 3 additions and 3 deletions

View File

@@ -22,7 +22,7 @@ export async function listFiles(request: ListFilesRequest): Promise<ListFilesRes
throw new ServerError(Status.INVALID_ARGUMENT, 'Missing task ID');
}
if (taskID.length < 8) {
if (taskID.length > 8) {
throw new ServerError(Status.INVALID_ARGUMENT, 'Task ID must be 1-8 characters');
}

View File

@@ -24,7 +24,7 @@ export async function registerTask(request: RegisterTaskRequest, context: CallCo
throw new ServerError(Status.INVALID_ARGUMENT, 'Missing task ID');
}
if (taskID.length < 8) {
if (taskID.length > 8) {
throw new ServerError(Status.INVALID_ARGUMENT, 'Task ID must be 1-8 characters');
}

View File

@@ -33,7 +33,7 @@ export async function uploadFile(request: UploadFileRequest, context: CallContex
throw new ServerError(Status.INVALID_ARGUMENT, 'Missing task ID');
}
if (taskID.length < 8) {
if (taskID.length > 8) {
throw new ServerError(Status.INVALID_ARGUMENT, 'Task ID must be 1-8 characters');
}