Copilot commented on code in PR #7318:
URL: https://github.com/apache/texera/pull/7318#discussion_r3717119507


##########
amber/src/main/scala/org/apache/texera/web/resource/dashboard/admin/user/AdminUserResource.scala:
##########
@@ -126,6 +127,13 @@ class AdminUserResource {
     userDao.insert(newUser)
   }
 
+  @GET
+  @Path("/created_datasets")
+  @Produces(Array(MediaType.APPLICATION_JSON))
+  def getCreatedDatasets(@QueryParam("user_id") user_id: Integer): 
List[DatasetQuota] = {
+    getUserCreatedDatasets(user_id)
+  }

Review Comment:
   The new endpoint accepts a required `user_id` query param but does not 
validate it. If the client omits `user_id`, the handler will call 
`getUserCreatedDatasets(null)`, which can silently return an empty list (or 
potentially match NULL owners depending on SQL rendering) instead of returning 
a clear 400 error.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to