Revert "Merge branch 'master' into 'vegetarian_meal'"

This reverts commit b3eeffdb32aa058f9f1aa6b9cbec3d05e2d07b8f
This commit is contained in:
Ceren Ugurlu
2019-03-17 13:24:32 +00:00
parent fb6dfcdd20
commit c23344e8ef
70 changed files with 10 additions and 4437 deletions

View File

@@ -10,8 +10,8 @@ import org.springframework.stereotype.Controller;
@Controller
public class DashBoardController {
private int count = 0;
@Autowired
UserService userService;
@FXML
public AnchorPane menuBar;

View File

@@ -12,7 +12,6 @@ import org.springframework.web.util.UriComponentsBuilder;
@Service
public class UserService {
@Autowired
RestTemplate restTemplate;
@@ -37,26 +36,4 @@ public class UserService {
System.out.println(builder.build().encode().toUri());
return this.restTemplate.getForObject(builder.build().encode().toUri(), UserDTO.class);
}
public UserDTO loginUser(String name, String password) {
HttpHeaders headers = new HttpHeaders();
headers.set("Accept", MediaType.APPLICATION_JSON_VALUE);
UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl("http://localhost:8080/loginUser")
.queryParam("name", name)
.queryParam("password", password);
HttpEntity<?> entity = new HttpEntity<>(headers);
System.out.println(builder.build().encode().toUri());
return this.restTemplate.getForObject(builder.build().encode().toUri(), UserDTO.class);
}
public UserDTO addVeganMeal(Long id, String name) {
HttpHeaders headers = new HttpHeaders();
headers.set("Accept", MediaType.APPLICATION_JSON_VALUE);
UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl("http://localhost:8080/addVeganMeal")
.queryParam("id", id)
.queryParam("name", name);
HttpEntity<?> entity = new HttpEntity<>(headers);
System.out.println(builder.build().encode().toUri());
return this.restTemplate.getForObject(builder.build().encode().toUri(), UserDTO.class);
}
}

View File

@@ -10,7 +10,7 @@
<children>
<AnchorPane fx:id="menuBar" prefHeight="603.0" prefWidth="216.0" style="-fx-background-color: #5a635c;">
<children>
<Label alignment="CENTER" contentDisplay="CENTER" layoutY="-2.0" prefHeight="90.0" prefWidth="216.0" text="Greenify" textAlignment="CENTER" textFill="#71bc84">
<Label alignment="CENTER" contentDisplay="CENTER" layoutY="-2.0" prefHeight="90.0" prefWidth="216.0" text="Go Green" textAlignment="CENTER" textFill="#71bc84">
<font>
<Font size="36.0" />
</font>