From 0ea199cd6bc879792f409009daaf3f4da331538b Mon Sep 17 00:00:00 2001 From: lynxwq2 Date: Tue, 25 Nov 2025 20:37:10 +0300 Subject: [PATCH] +beginning auth --- .../example/nto/controller/EmployeeController.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/main/java/com/example/nto/controller/EmployeeController.java b/src/main/java/com/example/nto/controller/EmployeeController.java index 47658f9..c26177b 100644 --- a/src/main/java/com/example/nto/controller/EmployeeController.java +++ b/src/main/java/com/example/nto/controller/EmployeeController.java @@ -1,10 +1,23 @@ package com.example.nto.controller; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.net.http.HttpResponse; + /** * TODO: ДОРАБОТАТЬ в рамках задания * ================================= * МОЖНО: Добавлять методы, аннотации, зависимости * НЕЛЬЗЯ: Изменять название класса и пакета */ +@RestController +@RequestMapping("code") public class EmployeeController { + @GetMapping("/auth/{id}") + public int isAuth(@PathVariable int id){ + return id; + } }