diff options
author | Baitinq <manuelpalenzuelamerino@gmail.com> | 2024-06-07 23:30:12 +0200 |
---|---|---|
committer | Baitinq <manuelpalenzuelamerino@gmail.com> | 2024-06-07 23:31:07 +0200 |
commit | 41caa3d8b12cbcf7b2ddf3b4f89f5cdc287e2349 (patch) | |
tree | 56d2377908d2daceb3b73d58aabdf7a20b991e9d | |
parent | payload-processor: Update file table schema name (diff) | |
download | fs-tracer-backend-41caa3d8b12cbcf7b2ddf3b4f89f5cdc287e2349.tar.gz fs-tracer-backend-41caa3d8b12cbcf7b2ddf3b4f89f5cdc287e2349.tar.bz2 fs-tracer-backend-41caa3d8b12cbcf7b2ddf3b4f89f5cdc287e2349.zip |
rest-api: Update file table schema name
-rw-r--r-- | src/rest-api/handler/db.go | 4 |
1 files 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) |