rename postgr fucntions

This commit is contained in:
gitGnome
2026-04-15 14:18:22 +02:00
parent 3c31e82061
commit 6d0eaa92e9
7 changed files with 49 additions and 40 deletions
+5 -5
View File
@@ -76,7 +76,7 @@ func HandleDm(response http.ResponseWriter, request *http.Request) {
Event: message,
})
err = postgresql.PgConnectionMessageSave(ctx, message)
err = postgresql.ConnectionMessageSave(ctx, message)
if err != nil {
http.Error(response, "internal server error", http.StatusInternalServerError)
return
@@ -139,7 +139,7 @@ func HandleUserGetConnectionMessages(response http.ResponseWriter, request *http
if validBufCount > 0 {
cutoff = buffer[0].CreatedAt
}
dbMessages, err := postgresql.PgConnectionGetMessagesBefore(ctx, cutoff, connectionId, remaining)
dbMessages, err := postgresql.ConnectionGetMessagesBefore(ctx, cutoff, connectionId, remaining)
if err != nil {
http.Error(response, "internal server error", http.StatusInternalServerError)
return
@@ -204,7 +204,7 @@ func HandleUserNewConnection(response http.ResponseWriter, request *http.Request
RecipientId: recipient.Id,
State: ConnectionState.Stranger,
}
err = postgresql.PgConnectionSave(ctx, connection)
err = postgresql.ConnectionSave(ctx, connection)
if err != nil {
http.Error(response, "internal server error", http.StatusInternalServerError)
return
@@ -264,7 +264,7 @@ func HandleUserDeleteConnection(response http.ResponseWriter, request *http.Requ
return
}
err = postgresql.PgConnectionDelete(ctx, conn)
err = postgresql.ConnectionDelete(ctx, conn)
if err != nil {
http.Error(response, "internal server error", http.StatusInternalServerError)
return
@@ -315,7 +315,7 @@ func HandleUserElevateConnection(response http.ResponseWriter, request *http.Req
return
}
err = postgresql.PgConnectionUpdateState(ctx, conn)
err = postgresql.ConnectionUpdateState(ctx, conn)
if err != nil {
http.Error(response, "internal server error", http.StatusInternalServerError)
return