Monorepo for Tangled tangled.org

appview: remove oauth.User type #1027

open opened by boltless.me targeting master from sl/uvpzuszrulvq

This is not required anymore. MultiAccountUser can just hold active user DID.

Signed-off-by: Seongmin Lee git@boltless.me

Labels

None yet.

assignee

None yet.

Participants 1
AT URI
at://did:plc:xasnlahkri4ewmbuzly2rlc5/sh.tangled.repo.pull/3mdcq5ouzmj22
+8 -8
Interdiff #4 #5
appview/issues/issues.go

This file has not been changed.

appview/knots/knots.go

This file has not been changed.

appview/labels/labels.go

This file has not been changed.

appview/middleware/middleware.go

This file has not been changed.

appview/notifications/notifications.go

This file has not been changed.

appview/oauth/accounts.go

This file has not been changed.

appview/oauth/oauth.go

This patch was likely rebased, as context lines do not match.

appview/pulls/pulls.go

This patch was likely rebased, as context lines do not match.

appview/repo/artifact.go

This file has not been changed.

appview/repo/repo.go

This file has not been changed.

appview/repo/settings.go

This file has not been changed.

appview/reporesolver/resolver.go

This file has not been changed.

appview/settings/settings.go

This patch was likely rebased, as context lines do not match.

appview/spindles/spindles.go

This file has not been changed.

appview/state/accounts.go

This file has not been changed.

appview/state/follow.go

This file has not been changed.

+2 -2
appview/state/login.go
··· 81 81 return 82 82 } 83 83 84 - currentDid := currentUser.Did 84 + currentDid := currentUser.Active.Did 85 85 86 86 var remainingAccounts []string 87 87 for _, acc := range currentUser.Accounts { ··· 114 114 return 115 115 } 116 116 117 - currentDid := currentUser.Active.Did 117 + currentDid := currentUser.Did 118 118 119 119 var remainingAccounts []string 120 120 for _, acc := range currentUser.Accounts {
appview/state/profile.go

This file has not been changed.

appview/state/reaction.go

This file has not been changed.

appview/state/star.go

This file has not been changed.

appview/state/state.go

This patch was likely rebased, as context lines do not match.

appview/state/timeline.go

This file has not been changed.

appview/strings/strings.go

This file has not been changed.

+6 -6
appview/settings/danger.go
··· 59 59 60 60 func (s *Settings) requestPasswordReset(w http.ResponseWriter, r *http.Request) { 61 61 user := s.OAuth.GetMultiAccountUser(r) 62 - if isTngl, _ := s.isTnglShUser(r.Context(), syntax.DID(user.Active.Did)); !isTngl { 62 + if isTngl, _ := s.isTnglShUser(r.Context(), syntax.DID(user.Did)); !isTngl { 63 63 s.Pages.Notice(w, "password-error", "Only available for tngl.sh accounts.") 64 64 return 65 65 } ··· 100 100 101 101 func (s *Settings) resetPassword(w http.ResponseWriter, r *http.Request) { 102 102 user := s.OAuth.GetMultiAccountUser(r) 103 - if isTngl, _ := s.isTnglShUser(r.Context(), syntax.DID(user.Active.Did)); !isTngl { 103 + if isTngl, _ := s.isTnglShUser(r.Context(), syntax.DID(user.Did)); !isTngl { 104 104 s.Pages.Notice(w, "password-error", "Only available for tngl.sh accounts.") 105 105 return 106 106 } ··· 134 134 135 135 func (s *Settings) deactivateAccount(w http.ResponseWriter, r *http.Request) { 136 136 user := s.OAuth.GetMultiAccountUser(r) 137 - if isTngl, _ := s.isTnglShUser(r.Context(), syntax.DID(user.Active.Did)); !isTngl { 137 + if isTngl, _ := s.isTnglShUser(r.Context(), syntax.DID(user.Did)); !isTngl { 138 138 s.Pages.Notice(w, "deactivate-error", "Only available for tngl.sh accounts.") 139 139 return 140 140 } ··· 172 172 173 173 func (s *Settings) requestAccountDelete(w http.ResponseWriter, r *http.Request) { 174 174 user := s.OAuth.GetMultiAccountUser(r) 175 - if isTngl, _ := s.isTnglShUser(r.Context(), syntax.DID(user.Active.Did)); !isTngl { 175 + if isTngl, _ := s.isTnglShUser(r.Context(), syntax.DID(user.Did)); !isTngl { 176 176 s.Pages.Notice(w, "delete-error", "Only available for tngl.sh accounts.") 177 177 return 178 178 } ··· 204 204 205 205 func (s *Settings) deleteAccount(w http.ResponseWriter, r *http.Request) { 206 206 user := s.OAuth.GetMultiAccountUser(r) 207 - if isTngl, _ := s.isTnglShUser(r.Context(), syntax.DID(user.Active.Did)); !isTngl { 207 + if isTngl, _ := s.isTnglShUser(r.Context(), syntax.DID(user.Did)); !isTngl { 208 208 s.Pages.Notice(w, "delete-error", "Only available for tngl.sh accounts.") 209 209 return 210 210 } ··· 269 269 270 270 func (s *Settings) reactivateAccount(w http.ResponseWriter, r *http.Request) { 271 271 user := s.OAuth.GetMultiAccountUser(r) 272 - if isTngl, _ := s.isTnglShUser(r.Context(), syntax.DID(user.Active.Did)); !isTngl { 272 + if isTngl, _ := s.isTnglShUser(r.Context(), syntax.DID(user.Did)); !isTngl { 273 273 s.Pages.Notice(w, "reactivate-error", "Only available for tngl.sh accounts.") 274 274 return 275 275 }

History

9 rounds 0 comments
sign up or login to add to the discussion
1 commit
expand
appview: remove oauth.User type
2/3 failed, 1/3 success
expand
merge conflicts detected
expand
  • appview/pulls/pulls.go:1378
expand 0 comments
1 commit
expand
appview: remove oauth.User type
2/3 failed, 1/3 success
expand
expand 0 comments
1 commit
expand
appview: remove oauth.User type
2/3 failed, 1/3 success
expand
expand 0 comments
1 commit
expand
appview: remove oauth.User type
2/3 failed, 1/3 success
expand
expand 0 comments
1 commit
expand
appview: remove oauth.User type
2/3 failed, 1/3 success
expand
expand 0 comments
1 commit
expand
appview: remove oauth.User type
3/3 success
expand
expand 0 comments
1 commit
expand
appview: remove oauth.User type
2/3 failed, 1/3 success
expand
expand 0 comments
1 commit
expand
appview: remove oauth.User type
2/3 failed, 1/3 success
expand
expand 0 comments
1 commit
expand
appview: remove oauth.User type
2/3 failed, 1/3 success
expand
expand 0 comments