Add fake admin decoy and neon redesign
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
package ru.serega6531.packmate.controller;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import ru.serega6531.packmate.security.FakeAdminResponder;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/fake-admin")
|
||||
@RequiredArgsConstructor
|
||||
public class FakeAdminController {
|
||||
|
||||
private final FakeAdminResponder responder;
|
||||
|
||||
@GetMapping(value = "/fun", produces = MediaType.TEXT_HTML_VALUE)
|
||||
public ResponseEntity<String> fun() {
|
||||
return ResponseEntity.ok(responder.funPageHtml());
|
||||
}
|
||||
|
||||
@GetMapping(value = "/fakePackets", produces = MediaType.TEXT_HTML_VALUE)
|
||||
public ResponseEntity<String> fakePackets() {
|
||||
return ResponseEntity.ok(responder.fakePacketsHtml());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package ru.serega6531.packmate.controller;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import ru.serega6531.packmate.model.pojo.FakeServiceDto;
|
||||
import ru.serega6531.packmate.service.ServicesService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/api/fake/")
|
||||
@RequiredArgsConstructor
|
||||
public class FakeFacadeController {
|
||||
|
||||
private final ServicesService servicesService;
|
||||
|
||||
@GetMapping("services")
|
||||
public List<FakeServiceDto> getServices() {
|
||||
return servicesService.findAllForFakeFacade();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user