Compare commits

..
Author SHA1 Message Date
phoenix 3ccc1a9a6d UserProfile (#1)
Go Release / build-and-release (push) Successful in 5s
Go CI / Test and Lint (push) Successful in 6s
Reviewed-on: phoenix/textsender-models#1
2026-05-27 22:59:45 -04:00
3 changed files with 31 additions and 32 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ jobs:
run: | run: |
echo "Creating version" echo "Creating version"
VERSION="0.2.2" VERSION="0.2.3"
PROJECT_COMMIT_HASH=$(git rev-parse HEAD | cut -c 1-10) PROJECT_COMMIT_HASH=$(git rev-parse HEAD | cut -c 1-10)
BRANCH_REF="${{ gitea.ref }}" BRANCH_REF="${{ gitea.ref }}"
BRANCH_NAME=$(echo "$BRANCH_REF" | cut -d '/' -f 3) BRANCH_NAME=$(echo "$BRANCH_REF" | cut -d '/' -f 3)
+2 -3
View File
@@ -7,7 +7,6 @@ import (
"github.com/google/uuid" "github.com/google/uuid"
) )
type UserProfile struct { type UserProfile struct {
UserId uuid.UUID `json:"user_id"` UserId uuid.UUID `json:"user_id"`
PhoneNumber string `json:"phone_number"` PhoneNumber string `json:"phone_number"`
@@ -27,10 +26,10 @@ func InitUserProfile(usr *User) (usrProfile *UserProfile, err error) {
usrProfile.PhoneNumber = usr.PhoneNumber usrProfile.PhoneNumber = usr.PhoneNumber
usrProfile.Username = usr.Username usrProfile.Username = usr.Username
if usr.Firstname != nil { if usr.Firstname != nil {
usrProfile.Firstname = *usr.Firstname usrProfile.Firstname = usr.Firstname
} }
if usr.Lastname != nil { if usr.Lastname != nil {
usrProfile.Lastname = *usr.Lastname usrProfile.Lastname = usr.Lastname
} }
usrProfile.Created = usr.Created usrProfile.Created = usr.Created
if usr.LastLogin != nil { if usr.LastLogin != nil {