forked from Cookies_Github_mirror/AquaDX
[api] Change message response model
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
package icu.samnyan.aqua.api.controller.sega.diva;
|
||||
|
||||
import icu.samnyan.aqua.api.model.OkResponse;
|
||||
import icu.samnyan.aqua.api.model.MessageResponse;
|
||||
import icu.samnyan.aqua.api.model.req.sega.diva.ModuleEntry;
|
||||
import icu.samnyan.aqua.api.model.req.sega.diva.PvListEntry;
|
||||
import icu.samnyan.aqua.api.model.req.sega.diva.PvListRequest;
|
||||
@@ -85,9 +85,9 @@ public class ApiDivaManageController {
|
||||
}
|
||||
|
||||
@DeleteMapping("festa/{id}")
|
||||
public OkResponse getFesta(@PathVariable int id) {
|
||||
public MessageResponse getFesta(@PathVariable int id) {
|
||||
festaRepository.deleteById(id);
|
||||
return new OkResponse("Deleted " + id);
|
||||
return new MessageResponse("Deleted " + id);
|
||||
}
|
||||
|
||||
@GetMapping("contest")
|
||||
@@ -101,9 +101,9 @@ public class ApiDivaManageController {
|
||||
}
|
||||
|
||||
@DeleteMapping("contest/{id}")
|
||||
public OkResponse deleteContest(@PathVariable int id) {
|
||||
public MessageResponse deleteContest(@PathVariable int id) {
|
||||
contestRepository.deleteById(id);
|
||||
return new OkResponse("Deleted " + id);
|
||||
return new MessageResponse("Deleted " + id);
|
||||
}
|
||||
|
||||
@GetMapping("news")
|
||||
|
||||
@@ -8,6 +8,7 @@ import icu.samnyan.aqua.sega.diva.model.common.Difficulty;
|
||||
import icu.samnyan.aqua.sega.diva.model.common.Edition;
|
||||
import icu.samnyan.aqua.sega.diva.model.userdata.*;
|
||||
import icu.samnyan.aqua.sega.diva.service.PlayerProfileService;
|
||||
import icu.samnyan.aqua.sega.general.model.Card;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
import org.springframework.http.HttpStatus;
|
||||
|
||||
@@ -3,14 +3,14 @@ package icu.samnyan.aqua.api.model;
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
public class OkResponse {
|
||||
public class MessageResponse {
|
||||
private String message = "ok";
|
||||
|
||||
public OkResponse(String message) {
|
||||
public MessageResponse(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public OkResponse() {
|
||||
public MessageResponse() {
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
Reference in New Issue
Block a user