Skip to content

product 1.0.1 - #410

Merged
Whale0928 merged 7 commits into
prodfrom
dev
Jun 21, 2025
Merged

product 1.0.1#410
Whale0928 merged 7 commits into
prodfrom
dev

Conversation

@Whale0928

Copy link
Copy Markdown
Collaborator

This pull request introduces significant updates to the Bottle Note project, including new features for root administrator verification, enhancements to documentation, and updates to the API server's functionality and structure. Below is a summary of the most important changes, grouped by theme.

Root Administrator Verification Features:

  • New AuthV2Controller for root admin verification: Added a new controller (AuthV2Controller) to check if the currently logged-in user has root administrator permissions.
  • Created RootAdmin domain entity: Introduced the RootAdmin entity to represent root admin users in the database.
  • Added RootAdminRepository: Implemented a repository to query root admin data, including a method to check if a user is a root admin.
  • Implemented AuthService logic: Added service logic to handle root admin verification using the RootAdminRepository.
  • Unit and documentation tests for AuthV2Controller: Created tests for the new controller, including RestDocs integration for documenting API responses.

Documentation Updates:

  • Added root admin API documentation: Updated the auth.adoc file with detailed documentation for the new root admin verification API, including request and response examples.
  • Integrated new API documentation: Included the auth.adoc file in the main documentation index (index.adoc) under the "auth" section.

API Enhancements:

  • Improved whiskey search API: Updated the whiskey search endpoint to allow larger page sizes and added the @no-cookie-jar annotation for better testing and debugging.

Codebase Improvements:

  • Expanded allowed prefixes for method names: Added "check" as an allowed prefix for method names in the ControllerLayerRules test file to comply with naming conventions.

Miscellaneous Updates:

  • Submodule update: Updated the submodule commit reference in git.environment-variables.
  • README overhaul: Revamped the README.md file with detailed descriptions of the project features, images, and improved formatting.

Copilot AI review requested due to automatic review settings June 19, 2025 00:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds root administrator verification features, integrates corresponding documentation, and refines API and project files.

  • Introduced AuthV2Controller, AuthService, RootAdminRepository, and RootAdmin entity for checking root admin status
  • Added RestDocs tests and updated AsciiDoc docs (auth.adoc, index.adoc) for the new endpoint
  • Enhanced API HTTP snippets, controller naming rules, and overhauled the README

Reviewed Changes

Copilot reviewed 11 out of 12 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/test/java/app/rule/api/ControllerLayerRules.java Allowed "check" prefix in controller naming rules
src/test/java/app/docs/user/RestAuthV2ControllerTest.java Added RestDocs test for admin permissions endpoint
src/main/java/app/bottlenote/user/service/AuthService.java Implemented checkAdminStatus service method
src/main/java/app/bottlenote/user/repository/RootAdminRepository.java Added existsByUserId method
src/main/java/app/bottlenote/user/domain/RootAdmin.java Created RootAdmin JPA entity
src/main/java/app/bottlenote/user/controller/AuthV2Controller.java New endpoint for root admin permission check
src/docs/asciidoc/index.adoc Included auth.adoc under auth section
src/docs/asciidoc/api/auth/auth.adoc Documented root admin permission API
http/위스키/위스키_검색.http Added @no-cookie-jar tags for testing snippets
git.environment-variables Updated submodule commit reference
README.md Revamped project description and images
Comments suppressed due to low confidence (5)

src/test/java/app/docs/user/RestAuthV2ControllerTest.java:51

  • [nitpick] The test method name 'login_test' is misleading; consider renaming it to something like 'checkAdminStatusTest' to reflect its purpose.
	void login_test() throws Exception {

src/main/java/app/bottlenote/user/controller/AuthV2Controller.java:25

  • The use of wildcard ResponseEntity<?> is vague; specify the generic type, e.g., ResponseEntity<GlobalResponse<Boolean>>, for clearer API contracts.
	public ResponseEntity<?> checkAdminStatus() {

src/docs/asciidoc/index.adoc:89

  • There appears to be an unmatched literal block delimiter (''' ) around the new auth section; verify AsciiDoc syntax so documentation builds correctly.
'''

README.md:11

  • [nitpick] The project name capitalization is inconsistent; use 'Bottle Note' to match the repository name and maintain consistency.
## *bottle note*

src/test/java/app/docs/user/RestAuthV2ControllerTest.java:57

  • Add a test case for when SecurityContextUtil.getUserIdByContext() returns empty to cover the error path (UserException) in the controller.
		//when

Comment thread README.md
Comment on lines +56 to 58
보틀노트는 위스키 애호가들이 모여 서로의 의견을 공유하고 <br/>
더욱 즐겁고 유익한 시음 경험을 할 수 있도록 도와줍니다.

Copilot AI Jun 19, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] This paragraph duplicates content earlier in the README; consider removing the duplicate to streamline the document.

Suggested change
보틀노트는 위스키 애호가들이 모여 서로의 의견을 공유하고 <br/>
더욱 즐겁고 유익한 시음 경험을 할 수 있도록 도와줍니다.

Copilot uses AI. Check for mistakes.
Signed-off-by: hgkim <hgkim@openerd.com>
Signed-off-by: hgkim <hgkim@openerd.com>
@sonarqubecloud

Copy link
Copy Markdown

@Whale0928
Whale0928 merged commit 70cb8b9 into prod Jun 21, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants