-
-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#119 Native Sublinks API #359
Open
Pdzly
wants to merge
132
commits into
main
Choose a base branch
from
issue/119-native-api
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jgrim
reviewed
Apr 24, 2024
src/main/java/com/sublinks/sublinksapi/api/sublinks/v1/person/mappers/PersonMapper.java
Outdated
Show resolved
Hide resolved
jgrim
reviewed
Apr 24, 2024
src/main/java/com/sublinks/sublinksapi/api/sublinks/v1/common/enums/DateSort.java
Outdated
Show resolved
Hide resolved
This commit removes an unnecessary blank line in the PersonMapper class. The removal cleans up the code and improves its readability. This change adheres to the defined code style guide.
…-native-api # Conflicts: # src/main/java/com/sublinks/sublinksapi/api/lemmy/v3/site/controllers/SiteController.java
The code refactor involved updating PersonService's relevant methods and adjusting their arguments and properties. Alongside this, JSON Web Token (JWT) authentication has been implemented to secure APIs. A new process for person registration has also been introduced, which now includes email verification and handling different registration modes. New components such as JwtFilter, JwtUtil and JwtPerson have been included for managing JWTs, and a new timeline endpoint for default controller is also introduced.
jgrim
reviewed
Apr 29, 2024
src/test/java/com/sublinks/sublinksapi/language/services/LanguageServiceUnitTests.java
Outdated
Show resolved
Hide resolved
jgrim
reviewed
Apr 29, 2024
src/main/java/com/sublinks/sublinksapi/person/services/PersonService.java
Outdated
Show resolved
Hide resolved
jgrim
reviewed
Apr 29, 2024
src/main/java/com/sublinks/sublinksapi/person/entities/PersonRegistrationApplication.java
Show resolved
Hide resolved
jgrim
reviewed
Apr 29, 2024
jgrim
reviewed
Apr 29, 2024
jgrim
reviewed
Apr 29, 2024
jgrim
reviewed
Apr 29, 2024
jgrim
reviewed
Apr 29, 2024
src/main/java/com/sublinks/sublinksapi/language/services/LanguageService.java
Outdated
Show resolved
Hide resolved
jgrim
reviewed
Apr 29, 2024
src/main/java/com/sublinks/sublinksapi/language/entities/Language.java
Outdated
Show resolved
Hide resolved
jgrim
reviewed
Apr 29, 2024
...va/com/sublinks/sublinksapi/api/sublinks/v1/privatemessage/mappers/PrivateMessageMapper.java
Outdated
Show resolved
Hide resolved
jgrim
previously requested changes
Apr 29, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, add javadoc to classes and methods.
…PI functionality Made changes throughout the project by replacing primitive boolean with its Wrapper class, Boolean. This allows for null values, which can represent 'undefined' status. In addition, introduced new community-related endpoints and services, for enhanced community details management. Also, new SortType and ListingType enumerations were added, to enrich the sorting and listing options. Implemented relevant conversions and mapping for new types.
Added method to find Instance by domain in the InstanceRepository and find methods for Community in the CommunityRepository. Enhanced SublinksCommunityService to handle community updates, deletion and removal, and validate unique titleSlugs upon creation. Also introduced ActorIdUtils for handling actorIDs.
Added SublinksCommentService for handling comment creation with proper validations and exception handling. Adjusted RoleAuthorizingService by introducing helper methods to check a person's permission status. Updated CommunityModActionsController with refined exception handling logic. Added necessary find methods in PostRepository and CommentRepository. Introduced new model classes for comments.
CommunityRepository has been refactored to use Optional for the return type of findCommunityByTitleSlug method to better handle absence of value situations. Additionally, logic has been added in createCommunity and updateCommunity methods to check user permissions for these operations. The updateCommunity method has also been simplified for better readability and efficiency.
jgrim
reviewed
May 5, 2024
...va/com/sublinks/sublinksapi/api/sublinks/v1/community/services/SublinksCommunityService.java
Outdated
Show resolved
Hide resolved
Previously, the pagination could start at an invalid state due to using zero as the lower bound. This change ensures that pagination correctly starts at page 1 instead of 0. Signed-off-by: rooki <[email protected]>
Introduced SublinksCommentSortTypeMapper to map SortType to CommentSortType. Refactored SublinksCommentService for improved sortType and listingType handling, ensuring null checks and default value assignments. Removed redundant imports in the affected classes. Signed-off-by: rooki <[email protected]>
Updated the Comment entity to have a nullable searchVector, modified service logic for saving comments, and added toBuilder for CommentResponse. Refactored SublinksRoleMapper usage and improved formatting consistency in service classes. Signed-off-by: rooki <[email protected]>
Removed the `replies` field and associated annotations from the `CommentResponse` model. Updated dependent mappers and services to reflect this change. This simplifies the comment structure and reduces unnecessary data handling. Signed-off-by: rooki <[email protected]>
The @builder annotation was removed from the CommentResponse record. This change likely addresses redundancy or issues caused by the builder pattern in this specific context. Signed-off-by: rooki <[email protected]>
Added InstanceResponse to PersonResponse model and integrated ACL service in person search for better permissions handling. Refactored pagination and search methods, optimizing query execution, and cleaned up unused imports. Signed-off-by: rooki <[email protected]>
Implemented a tree structure for handling comment replies, enabling nested comment representation. Removed unused dependencies and redundant fields in various controllers and services for better code maintainability. Also adjusted mappers to accommodate new replies structure, improving overall data handling. Signed-off-by: rooki <[email protected]>
Updated the JavaDoc to specify that comments without replies or missing parents are placed at the end of the list. This documentation update ensures developers understand the behavior when organizing comments into a hierarchy. Signed-off-by: rooki <[email protected]>
Corrected the documentation comment in the build comment tree method. This ensures the explanation for the comment reply structure is clear and complete, aiding future maintenance and understanding. Signed-off-by: rooki <[email protected]>
Corrected description to clarify handling of comments with no parent or missing parent in the list. This ensures better understanding of how orphaned comments are treated in the tree building process. Signed-off-by: rooki <[email protected]>
Refactored pagination handling into utility methods in `PaginationUtils` for consistency and reusability. Updated SQL query in `InstanceRepository` to correct syntax and improve domain search functionality. Enhanced readability by simplifying instance response conversion logic in `SublinksInstanceService`. Signed-off-by: rooki <[email protected]>
Standardized the naming of API tags across multiple controllers for clarity. Refactored exception handling to use the `orThrowUnauthorized` method, reducing redundancy in authorization checks. Signed-off-by: rooki <[email protected]>
Introduced Swagger annotations for `CreateCommunity`, `DeleteCommunity`, and `IndexCommunity` models. This improves API documentation by providing detailed descriptions and default values for relevant fields. These changes enhance developer understanding and API usability. Signed-off-by: rooki <[email protected]>
Added Swagger annotations to fields in `CommentResponse` and `UpdateComment` for improved API documentation clarity. Annotations provide thorough descriptions and specify required fields, enhancing the maintainability and user comprehension of the API. Signed-off-by: rooki <[email protected]>
Added Swagger annotations to enhance API documentation across multiple community and comment models. Renamed `AggregateCommentResponse` to `CommentAggregateResponse` for consistency and updated the relevant references in the service and controller files. Also included title update handling in the Community service logic. Signed-off-by: rooki <[email protected]>
Corrected the indentation in the aggregate method to improve code readability. This change ensures consistent formatting and maintains coding standards. Signed-off-by: rooki <[email protected]>
Refactored the SublinksCommentModerationController by removing the unused RolePermissionService dependency. This cleanup simplifies the code and removes redundant imports, enhancing maintainability. Signed-off-by: rooki <[email protected]>
Introduced token field and related methods for handling user sessions. Added endpoints for managing session invalidation and logout, enhancing session control functionalities. Signed-off-by: rooki <[email protected]>
Standardized formatting in the SublinksAnnouncementService class to enhance readability and maintain consistency. Primarily adjusted spacing in conditional statements and response status exception lambdas. Signed-off-by: rooki <[email protected]>
Included the JWT token in the SublinksJwtPerson object to ensure the token is accessible during authentication. This improvement enhances the security context by embedding the token with user authorities. Signed-off-by: rooki <[email protected]>
Signed-off-by: rooki <[email protected]>
Updated the URL of the 'docker' submodule to use HTTPS instead of SSH, pointing to a new repository. This change affects the '.gitmodules' file to reference the new repository location. Signed-off-by: rooki <[email protected]>
Updated the URL of the 'docker' submodule to use HTTPS instead of SSH, pointing to a new repository. This change affects the '.gitmodules' file to reference the new repository location. Signed-off-by: rooki <[email protected]>
The password field from createPersonForm is now included when building a new Person object. This ensures the password gets encrypted as part of the person creation process. Signed-off-by: rooki <[email protected]>
Added checks to return "invalid_token" error if JWT validation fails in both JwtFilter and SublinksJwtFilter classes. Simplified AddAdmin model by adjusting constructor format. Signed-off-by: rooki <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves #119
Implements #406 #425