Skip to content
Snippets Groups Projects
Commit a28e754c authored by Ethan Allen-Harris's avatar Ethan Allen-Harris Committed by Ethan Allen-Harris
Browse files

updating branch for refactoringe

parent ebb99d0d
No related branches found
No related tags found
No related merge requests found
......@@ -21,15 +21,13 @@ import java.util.Optional;
public class SignUpController {
private registerUserService regUserService;
private GetUserIdFromEmail GetIDFromEmailService;
//creates an object/list to pass into Model for Thymeleaf templating
List<String> EmailTakenContainer = new ArrayList<>();
@Autowired
public SignUpController(registerUserService rService, GetUserIdFromEmail aService) {
GetIDFromEmailService = aService;
public SignUpController(registerUserService rService) {
regUserService = rService;
}
......
......@@ -51,7 +51,7 @@ public class selectCategoriesControllers {
List<String> TagID_List = Arrays.asList(listOfTagIDs.split(",")); //splits it into string list for easier handling
Integer UserID = JWTUtils.getLoggedInUserId(session).get();
int UserID = JWTUtils.getLoggedInUserId(session).get();
for (String TagID : TagID_List){
......@@ -74,6 +74,8 @@ public class selectCategoriesControllers {
if(user.isPresent()){System.out.println(user.get());
}else{ return "redirect:/login";}
System.out.println("valid user session, fetching all tags");
List<Tags> allTags = tagsRepo.findAll();
model.addAttribute("allTagsAttributeName", allTags);
System.out.println(allTags);
......
package com.example.clientproject.web.controllers;
import com.example.clientproject.domain.AccountRegister;
import com.example.clientproject.services.newAccountDTO;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.CsvSource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest;
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.annotation.DirtiesContext;
......@@ -15,7 +9,6 @@ import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.jdbc.Sql;
import org.springframework.test.web.servlet.MockMvc;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment