Save account info

This commit is contained in:
Andre Medeiros 2021-08-14 11:21:17 -04:00
parent 993c07938c
commit 002851efe7

View file

@ -91,6 +91,9 @@ func (a *api) upsertAccountsHandler(w http.ResponseWriter, r *http.Request) {
return
}
// Set account ID from Reddit
acc.AccountID = me.ID
if err := a.accountRepo.CreateOrUpdate(ctx, &acc); err != nil {
a.errorResponse(w, r, 422, err.Error())
return