about summary refs log tree commit diff
path: root/src/rest-api/handler/db.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/rest-api/handler/db.go')
-rw-r--r--src/rest-api/handler/db.go4
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)