From 45b805d330ee557a32a4d9b38c09b978f829f725 Mon Sep 17 00:00:00 2001
From: rt00492 <rt00492@surrey.ac.uk>
Date: Sat, 30 Apr 2022 23:46:19 +0100
Subject: [PATCH] Remove authentication

---
 app/controllers/auth_controller.rb | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/app/controllers/auth_controller.rb b/app/controllers/auth_controller.rb
index 9e49d9b..be7280c 100644
--- a/app/controllers/auth_controller.rb
+++ b/app/controllers/auth_controller.rb
@@ -15,15 +15,11 @@ class AuthController < ApplicationController
 
     def get_email
         ids = params["auth"]["ids"]
-        if authenticate_user!
-            emails = []
-            ids.each do |i|
-                emails.push(User.find_by(id: i).email)
-            end 
-            render json: { emails: emails }, status: 200
-        else
-            auth_fail
-        end
+        emails = []
+        ids.each do |i|
+            emails.push(User.find_by(id: i).email)
+        
+        render json: { emails: emails }, status: 200
     end
 
     def password_reset_token
-- 
GitLab