From 41caa3d8b12cbcf7b2ddf3b4f89f5cdc287e2349 Mon Sep 17 00:00:00 2001 From: Baitinq Date: Fri, 7 Jun 2024 23:30:12 +0200 Subject: rest-api: Update file table schema name --- src/rest-api/handler/db.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rest-api/handler/db.go b/src/rest-api/handler/db.go index 49d8e35..fc32f5c 100644 --- a/src/rest-api/handler/db.go +++ b/src/rest-api/handler/db.go @@ -26,7 +26,7 @@ func NewDB(db *sqlx.DB) DB { func (db DBImpl) GetLatestFileByPath(ctx context.Context, path string, user_id string) (*lib.File, error) { var file lib.File err := db.db.GetContext(ctx, &file, ` - SELECT * FROM private.file + SELECT * FROM public.file WHERE user_id = $1 AND absolute_path = $2 @@ -47,7 +47,7 @@ func (db DBImpl) GetUserIDByAPIKey(ctx context.Context, apiKey string) (string, var userID string err := db.db.GetContext(ctx, &userID, ` - SELECT id FROM private.api_keys + SELECT user_id FROM public.api_key WHERE api_key = $1 LIMIT 1 `, apiKey) -- cgit 1.4.1