add profile actors
Build and Publish / BuildAndDeployArm64 (push) Failing after 5s
Build and Publish / BuildAndDeployAmd64 (push) Failing after 3s

This commit is contained in:
2026-06-25 17:19:59 +02:00
parent faa5330b81
commit 86797e520e
18 changed files with 3436 additions and 10 deletions
+33
View File
@@ -0,0 +1,33 @@
package profile
import (
"fmt"
messages "git.k6n.net/mats/go-cart-actor/proto/profile"
)
// HandleSetProfile updates the user's core profile information.
func HandleSetProfile(p *ProfileGrain, m *messages.SetProfile) error {
if m == nil {
return fmt.Errorf("SetProfile: nil payload")
}
if m.Name != nil {
p.Name = *m.Name
}
if m.Email != nil {
p.Email = *m.Email
}
if m.Phone != nil {
p.Phone = *m.Phone
}
if m.Language != nil {
p.Language = *m.Language
}
if m.Currency != nil {
p.Currency = *m.Currency
}
if m.AvatarUrl != nil {
p.AvatarUrl = *m.AvatarUrl
}
return nil
}