Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5b36e5c42e |
@@ -25,7 +25,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
echo "Creating version"
|
echo "Creating version"
|
||||||
|
|
||||||
VERSION="0.2.1"
|
VERSION="0.2.2"
|
||||||
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)
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package user
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/google/uuid"
|
||||||
|
"time"
|
||||||
|
)
|
||||||
|
|
||||||
|
type UserLoginHistory struct {
|
||||||
|
Id uuid.UUID `json:"id"`
|
||||||
|
LoginTime time.Time `json:"login_time"`
|
||||||
|
UserId uuid.UUID `json:"user_id"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type ServiceUserLoginHistory struct {
|
||||||
|
Id uuid.UUID `json:"id"`
|
||||||
|
LoginTime time.Time `json:"login_time"`
|
||||||
|
ServiceUserId uuid.UUID `json:"service_user_id"`
|
||||||
|
}
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
package user
|
|
||||||
|
|
||||||
|
|
||||||
type UserProfile struct {
|
|
||||||
Usr *User `json:"user"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func InitUserProfile(usr *User) (usrProfile *UserProfile, done bool) {
|
|
||||||
if usr == nil {
|
|
||||||
return nil, false
|
|
||||||
} else {
|
|
||||||
if len(usr.Password) > 0 {
|
|
||||||
newUsr := usr
|
|
||||||
newUsr.Password = ""
|
|
||||||
usrProfile.Usr = newUsr
|
|
||||||
|
|
||||||
return usrProfile, true
|
|
||||||
} else {
|
|
||||||
usrProfile.Usr = newUsr
|
|
||||||
return usrProfile, true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user