aicam commented on code in PR #3675:
URL: https://github.com/apache/texera/pull/3675#discussion_r2285506717


##########
core/gui/src/app/common/service/user/auth.service.ts:
##########
@@ -154,7 +154,7 @@ export class AuthService {
       googleId: this.jwtHelperService.decodeToken(token).googleId,
       googleAvatar: this.jwtHelperService.decodeToken(token).googleAvatar,
       role: role,
-      comment: this.jwtHelperService.decodeToken(token).comment,
+      comment: this.jwtHelperService.decodeToken(token).comment

Review Comment:
   This change is not needed



##########
core/gui/src/app/dashboard/component/admin/user/admin-user.component.ts:
##########
@@ -195,6 +195,13 @@ export class AdminUserComponent implements OnInit {
     return Date.now() - lastMs < AdminUserComponent.ACTIVE_WINDOW;
   }
 
+  getAccCreation(user: User): number {
+    if (!user.accCreation) {
+      return 0;
+    }
+    return user.accCreation * 1000;

Review Comment:
   Is there anyway to do it using libraries instead of manually multiplying by 
1000? 



##########
deployment/k8s/texera-helmchart/files/texera_ddl.sql:
##########
@@ -393,6 +393,28 @@ CREATE TABLE IF NOT EXISTS time_log
     last_login     TIMESTAMPTZ
 );
 
+WITH ts AS (SELECT '2025-01-01 00:00:00-07'::timestamptz AS t)
+INSERT INTO time_log (uid, acc_creation)
+SELECT u.uid, ts.t
+FROM "user" u, ts
+ON CONFLICT (uid) DO NOTHING;
+
+CREATE OR REPLACE FUNCTION time_log_autocreate()
+RETURNS trigger AS $$
+BEGIN
+INSERT INTO time_log (uid, acc_creation)
+VALUES (NEW.uid, now())
+ON CONFLICT (uid) DO NOTHING;
+RETURN NEW;
+END
+$$ LANGUAGE plpgsql;
+
+DROP TRIGGER IF EXISTS trg_time_log_autocreate ON "user";
+CREATE TRIGGER trg_time_log_autocreate

Review Comment:
   What is the role of `trg_time_log_autocreate`?



-- 
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