jaeyun0503 commented on code in PR #3710:
URL: https://github.com/apache/texera/pull/3710#discussion_r2321180280


##########
core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/hub/HubResource.scala:
##########
@@ -149,46 +134,47 @@ object HubResource {
   }
 
   /**
-    * Records a user's activity in the system.
+    * Records a user's action in the system.
     *
     * @param request The HTTP request object to extract the user's IP address.
     * @param userId The ID of the user performing the action (default is 0 for 
anonymous users).
     * @param entityId The ID of the entity associated with the action.
     * @param entityType The type of entity being acted upon (validated before 
processing).
     * @param action The action performed by the user ("like", "unlike", 
"view", "clone").
     */
-  def recordUserActivity(
+  def recordUserAction(
       request: HttpServletRequest,
       userId: Integer = Integer.valueOf(0),
       entityId: Integer,
       entityType: EntityType,
       action: ActionType
   ): Unit = {

Review Comment:
    I think this PR mainly focuses on changing the schema of the table 
`user_activity`, so I think if we want to make changes to the functions, we 
should raise a separate PR? But to answer your question, recordUserAction 
returns Unit, recordLikeAction returns boolean. `true` from `recordLikeAction` 
means that the status of the user's like change, and `false` means nothing 
happened. I did not implement this file but based on the design I think the 
contributor of this code wanted to make `recordUserAction` a more generalized 
function



-- 
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: dev-unsubscr...@texera.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to