From 94b3fec5e2763c1f285e22a3bd809da81354eddb Mon Sep 17 00:00:00 2001 From: Mika Bomm Date: Sun, 1 Sep 2024 21:43:13 +0200 Subject: [PATCH] remove duplicated get method to /api/v1/users from the main file --- .../mixel/docusphere/DocuSphereApplication.java | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/server/src/main/java/com/mixel/docusphere/DocuSphereApplication.java b/server/src/main/java/com/mixel/docusphere/DocuSphereApplication.java index c79016b..dbe3104 100644 --- a/server/src/main/java/com/mixel/docusphere/DocuSphereApplication.java +++ b/server/src/main/java/com/mixel/docusphere/DocuSphereApplication.java @@ -1,31 +1,14 @@ package com.mixel.docusphere; -import com.mixel.docusphere.entity.User; -import com.mixel.docusphere.repository.UserRepository; - import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; -import java.util.List; - @SpringBootApplication @RestController public class DocuSphereApplication { - public DocuSphereApplication(UserRepository userRepository) { - this.userRepository = userRepository; - } - public static void main(String[] args) { SpringApplication.run(DocuSphereApplication.class, args); } - - private final UserRepository userRepository; - - @GetMapping("/api/v1/users") - public List getUsers() { - return userRepository.findAll(); - } }