rename postgr fucntions
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user