mirror of
https://github.com/owncast/owncast.git
synced 2024-12-18 07:12:33 +03:00
Remove unused query
This commit is contained in:
parent
ffd24ccccb
commit
0a48492462
5 changed files with 3 additions and 22 deletions
|
@ -277,12 +277,6 @@ func AddToOutbox(iri string, itemData []byte, typeString string, isLiveNotificat
|
||||||
return tx.Commit()
|
return tx.Commit()
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetObjectByID will return a string representation of a single object by the ID.
|
|
||||||
func GetObjectByID(id string) (string, error) {
|
|
||||||
value, err := _datastore.GetQueries().GetObjectFromOutboxByID(context.Background(), id)
|
|
||||||
return string(value), err
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetObjectByIRI will return a string representation of a single object by the IRI.
|
// GetObjectByIRI will return a string representation of a single object by the IRI.
|
||||||
func GetObjectByIRI(iri string) (string, bool, time.Time, error) {
|
func GetObjectByIRI(iri string) (string, bool, time.Time, error) {
|
||||||
row, err := _datastore.GetQueries().GetObjectFromOutboxByIRI(context.Background(), iri)
|
row, err := _datastore.GetQueries().GetObjectFromOutboxByIRI(context.Background(), iri)
|
||||||
|
|
2
db/db.go
2
db/db.go
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by sqlc. DO NOT EDIT.
|
// Code generated by sqlc. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// sqlc v1.13.0
|
// sqlc v1.14.0
|
||||||
|
|
||||||
package db
|
package db
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by sqlc. DO NOT EDIT.
|
// Code generated by sqlc. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// sqlc v1.13.0
|
// sqlc v1.14.0
|
||||||
|
|
||||||
package db
|
package db
|
||||||
|
|
||||||
|
|
|
@ -29,8 +29,6 @@ SELECT iri, inbox, name, username, image, request, request_object, created_at, a
|
||||||
-- name: GetOutboxWithOffset :many
|
-- name: GetOutboxWithOffset :many
|
||||||
SELECT value FROM ap_outbox LIMIT $1 OFFSET $2;
|
SELECT value FROM ap_outbox LIMIT $1 OFFSET $2;
|
||||||
|
|
||||||
-- name: GetObjectFromOutboxByID :one
|
|
||||||
SELECT value FROM ap_outbox WHERE iri = $1;
|
|
||||||
|
|
||||||
-- name: GetObjectFromOutboxByIRI :one
|
-- name: GetObjectFromOutboxByIRI :one
|
||||||
SELECT value, live_notification, created_at FROM ap_outbox WHERE iri = $1;
|
SELECT value, live_notification, created_at FROM ap_outbox WHERE iri = $1;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by sqlc. DO NOT EDIT.
|
// Code generated by sqlc. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// sqlc v1.13.0
|
// sqlc v1.14.0
|
||||||
// source: query.sql
|
// source: query.sql
|
||||||
|
|
||||||
package db
|
package db
|
||||||
|
@ -439,17 +439,6 @@ func (q *Queries) GetNotificationDestinationsForChannel(ctx context.Context, cha
|
||||||
return items, nil
|
return items, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
const getObjectFromOutboxByID = `-- name: GetObjectFromOutboxByID :one
|
|
||||||
SELECT value FROM ap_outbox WHERE iri = $1
|
|
||||||
`
|
|
||||||
|
|
||||||
func (q *Queries) GetObjectFromOutboxByID(ctx context.Context, iri string) ([]byte, error) {
|
|
||||||
row := q.db.QueryRowContext(ctx, getObjectFromOutboxByID, iri)
|
|
||||||
var value []byte
|
|
||||||
err := row.Scan(&value)
|
|
||||||
return value, err
|
|
||||||
}
|
|
||||||
|
|
||||||
const getObjectFromOutboxByIRI = `-- name: GetObjectFromOutboxByIRI :one
|
const getObjectFromOutboxByIRI = `-- name: GetObjectFromOutboxByIRI :one
|
||||||
SELECT value, live_notification, created_at FROM ap_outbox WHERE iri = $1
|
SELECT value, live_notification, created_at FROM ap_outbox WHERE iri = $1
|
||||||
`
|
`
|
||||||
|
|
Loading…
Reference in a new issue