Add more requests
This commit is contained in:
@@ -1,9 +1,12 @@
|
|||||||
package com.faf223.expensetrackerfaf.controllers;
|
package com.faf223.expensetrackerfaf.controllers;
|
||||||
|
|
||||||
|
import entities.Expense;
|
||||||
|
import entities.Income;
|
||||||
|
import entities.Role;
|
||||||
import entities.User;
|
import entities.User;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import java.util.List;
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
public class MainController {
|
public class MainController {
|
||||||
@@ -18,4 +21,46 @@ public class MainController {
|
|||||||
return new User(id, "Test", null, null, null, null, null, null);
|
return new User(id, "Test", null, null, null, null, null, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/users/set/{id}/name")
|
||||||
|
public String setName(@PathVariable int id,
|
||||||
|
@RequestParam("name") String name) {
|
||||||
|
throw new UnsupportedOperationException("Waiting for the DB.");
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/users/set/{id}/email")
|
||||||
|
public String setEmail(@PathVariable int id,
|
||||||
|
@RequestParam("email") String email) {
|
||||||
|
throw new UnsupportedOperationException("Waiting for the DB.");
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/users/set/{id}/login")
|
||||||
|
public String setLogin(@PathVariable int id,
|
||||||
|
@RequestParam("login") String login) {
|
||||||
|
throw new UnsupportedOperationException("Waiting for the DB.");
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/users/set/{id}/password")
|
||||||
|
public String setPassword(@PathVariable int id,
|
||||||
|
@RequestParam("password") String password) {
|
||||||
|
throw new UnsupportedOperationException("Waiting for the DB.");
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/users/set/{id}/role")
|
||||||
|
public String setRole(@PathVariable int id,
|
||||||
|
@RequestParam("role") Role role) {
|
||||||
|
throw new UnsupportedOperationException("Waiting for the DB.");
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/users/set/{id}/expenses")
|
||||||
|
public String setExpenses(@PathVariable int id,
|
||||||
|
@RequestParam("expenses") List<Expense> expenses) {
|
||||||
|
throw new UnsupportedOperationException("Waiting for the DB.");
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/users/set/{id}/incomes")
|
||||||
|
public String setIncomes(@PathVariable int id,
|
||||||
|
@RequestParam("incomes")List<Income> incomes) {
|
||||||
|
throw new UnsupportedOperationException("Waiting for the DB.");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user