mirror of https://github.com/hykilpikonna/AquaDX
[api] Change message response model
parent
b3eb82edeb
commit
266d7a20f0
|
@ -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() {
|
Loading…
Reference in New Issue