mirror of
https://github.com/christianselig/apollo-backend
synced 2024-11-10 22:17:44 +00:00
fixes
This commit is contained in:
parent
815b577bf5
commit
e86dd3266a
2 changed files with 1 additions and 2 deletions
|
@ -91,7 +91,6 @@ func (a *api) upsertAccountsHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|
||||||
laccs, err := a.accountRepo.GetByAPNSToken(ctx, apns)
|
laccs, err := a.accountRepo.GetByAPNSToken(ctx, apns)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println("accounts by apns")
|
|
||||||
a.errorResponse(w, r, 422, err.Error())
|
a.errorResponse(w, r, 422, err.Error())
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
@ -186,7 +186,7 @@ func (p *postgresAccountRepository) Disassociate(ctx context.Context, acc *domai
|
||||||
|
|
||||||
func (p *postgresAccountRepository) GetByAPNSToken(ctx context.Context, token string) ([]domain.Account, error) {
|
func (p *postgresAccountRepository) GetByAPNSToken(ctx context.Context, token string) ([]domain.Account, error) {
|
||||||
query := `
|
query := `
|
||||||
SELECT accounts.id, username, accounts.account_id, access_token, refresh_token, expires_at, last_message_id, last_checked_at
|
SELECT accounts.id, username, accounts.account_id, access_token, refresh_token, expires_at, last_message_id, last_checked_at, last_unstuck_at
|
||||||
FROM accounts
|
FROM accounts
|
||||||
INNER JOIN devices_accounts ON accounts.id = devices_accounts.account_id
|
INNER JOIN devices_accounts ON accounts.id = devices_accounts.account_id
|
||||||
INNER JOIN devices ON devices.id = devices_accounts.device_id
|
INNER JOIN devices ON devices.id = devices_accounts.device_id
|
||||||
|
|
Loading…
Reference in a new issue