Skip to content

Commit

Permalink
一些基础api
Browse files Browse the repository at this point in the history
  • Loading branch information
danbai225 committed Jan 22, 2024
1 parent db0ac72 commit 584ca90
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
10 changes: 10 additions & 0 deletions build_mac.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
git pull
tag=$(git describe --abbrev=0 --tags)
if [[ $tag == "" ]]
then
tag="build"
fi
docker buildx build -t danbai225/go-rustdesk-server:"$tag" --platform=linux/amd64 .
docker buildx build -t danbai225/go-rustdesk-server:latest --platform=linux/amd64 .
docker push danbai225/go-rustdesk-server:"$tag"
docker push danbai225/go-rustdesk-server:latest
4 changes: 2 additions & 2 deletions data_server/impl/clover_impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -309,12 +309,12 @@ func (c *CloverDataSever) CheckToken(token string) (*model.User, error) {
return user, nil
}
func (c *CloverDataSever) GenToken(name string) (string, error) {
defer c.userLock.Unlock()
c.userLock.Unlock()
user, err := c.GetUserByName(name)
if err != nil {
return "", err
}
defer c.userLock.Unlock()
c.userLock.Lock()
if user == nil {
return "", errors.New("user not exist")
}
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ services:
- ./clover-db/:/app/clover-db
- ./key/:/app/key
ports:
- "21114:21114"
- "21115:21115"
- "21116:21116/tcp"
- "21116:21116/udp"
Expand Down

0 comments on commit 584ca90

Please sign in to comment.