Skip to content

Commit

Permalink
feat: continue work on dbsync logic
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Trost <[email protected]>
  • Loading branch information
galexrt committed Jan 6, 2025
1 parent 7fbbbc5 commit 814bc82
Show file tree
Hide file tree
Showing 18 changed files with 664 additions and 600 deletions.
29 changes: 17 additions & 12 deletions gen/go/proto/resources/internet/page.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions gen/go/proto/services/auth/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -838,11 +838,11 @@ func (s *Server) SetSuperUserMode(ctx context.Context, req *SetSuperUserModeRequ
}

func (s *Server) getJobWithProps(ctx context.Context, jobName string) (*users.Job, int32, *users.JobProps, error) {
js := tJobs.AS("job")
stmt := js.
tJobs := tJobs.AS("job")
stmt := tJobs.
SELECT(
js.Name,
js.Label,
tJobs.Name,
tJobs.Label,
tJobGrades.Grade.AS("job_grade"),
tJobProps.Job,
tJobProps.UpdatedAt,
Expand All @@ -853,15 +853,15 @@ func (s *Server) getJobWithProps(ctx context.Context, jobName string) (*users.Jo
tJobProps.LogoURL,
).
FROM(
js.
tJobs.
INNER_JOIN(tJobGrades,
tJobGrades.JobName.EQ(js.Name),
tJobGrades.JobName.EQ(tJobs.Name),
).
LEFT_JOIN(tJobProps,
tJobProps.Job.EQ(js.Name)),
tJobProps.Job.EQ(tJobs.Name)),
).
WHERE(
js.Name.EQ(jet.String(jobName)),
tJobs.Name.EQ(jet.String(jobName)),
).
ORDER_BY(tJobGrades.Grade.DESC()).
LIMIT(1)
Expand Down
9 changes: 9 additions & 0 deletions gen/go/proto/services/sync/activity.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,22 @@ func (s *Server) AddActivity(ctx context.Context, req *AddActivityRequest) (*Add
switch d := req.Activity.Activity.(type) {
case *sync.AddActivity_UserActivity:
_ = d
if d.UserActivity.UserProps != nil {
// Set user props
}

// TODO handle traffic points

case *sync.AddActivity_JobsUserActivity:
if d.JobsUserActivity.JobsUserProps != nil {
// Set user props
}

// TODO

case *sync.AddActivity_JobsTimeclock:
// TODO

}

return resp, nil
Expand Down
Loading

0 comments on commit 814bc82

Please sign in to comment.