Skip to content

Commit 297ef17

Browse files
committed
fix: 修复密码问题
1 parent 0689718 commit 297ef17

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ services:
2323
condition: service_healthy
2424
required: false
2525
environment:
26-
DATABASE_URL: ${DATABASE_URL:?Set DATABASE_URL in .env}
26+
DATABASE_URL: postgres://${POSTGRES_USER:-cloudproxy}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB:-cloudproxy}?sslmode=disable
2727
CONTROL_PLANE_ADDR: ":8080"
2828
HOST_AGENT_MODE: embedded
2929
ADMIN_USERNAME: ${ADMIN_USERNAME:-admin}

internal/store/repository/queries.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ func (r *Repository) GetBootstrapUserByUsername(ctx context.Context, username st
248248
func (r *Repository) GetPrimaryHostByUserID(ctx context.Context, userID string) (Host, error) {
249249
var item Host
250250
if err := r.db.QueryRow(ctx, `
251-
SELECT id::text, user_id::text, status, COALESCE(short_id, ''), template_image_ref, home_volume_name, slot_key, timezone, hostname, memory_limit_mb, cpu_limit, disk_limit_gb, created_at, updated_at
251+
SELECT id::text, user_id::text, status, COALESCE(short_id, ''), COALESCE(entry_password, ''), template_image_ref, home_volume_name, slot_key, timezone, hostname, memory_limit_mb, cpu_limit, disk_limit_gb, created_at, updated_at
252252
FROM hosts
253253
WHERE user_id = $1 AND slot_key = 'primary'
254254
LIMIT 1
@@ -257,6 +257,7 @@ func (r *Repository) GetPrimaryHostByUserID(ctx context.Context, userID string)
257257
&item.UserID,
258258
&item.Status,
259259
&item.ShortID,
260+
&item.EntryPassword,
260261
&item.TemplateImageRef,
261262
&item.HomeVolumeName,
262263
&item.SlotKey,

0 commit comments

Comments
 (0)