-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #225 from COS301-SE-2023/dev
Demo 3 Dev
- Loading branch information
Showing
610 changed files
with
25,599 additions
and
7,383 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 0 additions & 65 deletions
65
apps/api/src/main/java/com/fridgetoplate/api/IngredientController.java
This file was deleted.
Oops, something went wrong.
43 changes: 0 additions & 43 deletions
43
apps/api/src/main/java/com/fridgetoplate/api/RecipeController.java
This file was deleted.
Oops, something went wrong.
22 changes: 0 additions & 22 deletions
22
apps/api/src/main/java/com/fridgetoplate/api/RecommendController.java
This file was deleted.
Oops, something went wrong.
51 changes: 51 additions & 0 deletions
51
apps/api/src/main/java/com/fridgetoplate/controller/ExploreController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/** | ||
* This is a Java class that defines the REST API endpoints for managing ingredients in a recipe | ||
* application. | ||
*/ | ||
package com.fridgetoplate.controller; | ||
|
||
import java.util.List; | ||
|
||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.web.bind.annotation.CrossOrigin; | ||
import org.springframework.web.bind.annotation.DeleteMapping; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.PathVariable; | ||
import org.springframework.web.bind.annotation.PostMapping; | ||
import org.springframework.web.bind.annotation.PutMapping; | ||
import org.springframework.web.bind.annotation.RequestBody; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.RequestMethod; | ||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
import com.fridgetoplate.frontendmodels.RecipeFrontendModel; | ||
import com.fridgetoplate.interfaces.Explore; | ||
import com.fridgetoplate.interfaces.Recipe; | ||
import com.fridgetoplate.model.Ingredient; | ||
import com.fridgetoplate.model.MealPlanModel; | ||
import com.fridgetoplate.model.ProfileModel; | ||
import com.fridgetoplate.repository.ExploreRepository; | ||
// import com.fridgetoplate.repository.IngredientRepository; | ||
import com.fridgetoplate.repository.MealPlanRepository; | ||
|
||
@RestController | ||
@CrossOrigin(origins = "*", allowedHeaders = "*", methods = { RequestMethod.GET, RequestMethod.POST, RequestMethod.PUT, RequestMethod.DELETE }) | ||
@RequestMapping("/explore") | ||
|
||
public class ExploreController { | ||
|
||
@Autowired | ||
private ExploreRepository exploreRepository; | ||
|
||
|
||
@GetMapping | ||
public List<RecipeFrontendModel> findAll() { | ||
return exploreRepository.findAll(); | ||
} | ||
|
||
@PostMapping("/search") | ||
public List<RecipeFrontendModel> findBySearch(@RequestBody Explore search) { | ||
return exploreRepository.findBySearch(search); | ||
} | ||
|
||
} |
Oops, something went wrong.