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 = "/packets", produces = MediaType.TEXT_HTML_VALUE)
    public ResponseEntity<String> fakePackets() {
        return ResponseEntity.ok(responder.fakePacketsHtml());
    }
}
