Browse Source

refactor: Renamed canRequest require login parameter

Owen Diffey 3 years ago
parent
commit
bdf9608991
2 changed files with 4 additions and 4 deletions
  1. 2 2
      frontend/src/pages/Home.vue
  2. 2 2
      frontend/src/pages/Station/Sidebar/index.vue

+ 2 - 2
frontend/src/pages/Home.vue

@@ -784,10 +784,10 @@ export default {
 		isOwnerOrAdmin(station) {
 			return this.isOwner(station) || this.isAdmin();
 		},
-		canRequest(station, loggedIn = true) {
+		canRequest(station, requireLogin = true) {
 			return (
 				station &&
-				(!loggedIn || this.loggedIn) &&
+				(!requireLogin || this.loggedIn) &&
 				station.requests &&
 				station.requests.enabled &&
 				(station.requests.access === "user" ||

+ 2 - 2
frontend/src/pages/Station/Sidebar/index.vue

@@ -96,10 +96,10 @@ export default {
 		isOwnerOrAdmin() {
 			return this.isOwner() || this.isAdmin();
 		},
-		canRequest(loggedIn = true) {
+		canRequest(requireLogin = true) {
 			return (
 				this.station &&
-				(!loggedIn || this.loggedIn) &&
+				(!requireLogin || this.loggedIn) &&
 				this.station.requests &&
 				this.station.requests.enabled &&
 				(this.station.requests.access === "user" ||