Imagery imported for icons and items. Live updates working.

Hover tooltip working. Features.md added for better tracking.
This commit is contained in:
2025-10-28 08:41:04 +08:00
parent 4ea30cc12e
commit ea8484fca7
16068 changed files with 3097 additions and 6 deletions

View File

@@ -10,6 +10,7 @@ import org.springframework.security.config.annotation.web.configurers.AbstractHt
import org.springframework.security.config.http.SessionCreationPolicy;
import org.springframework.security.web.SecurityFilterChain;
import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
import org.springframework.web.cors.CorsConfigurationSource;
/**
* Security configuration for Group Ironmen API.
@@ -29,10 +30,14 @@ import org.springframework.security.web.authentication.UsernamePasswordAuthentic
public class SecurityConfig {
private final TokenAuthenticationFilter tokenAuthenticationFilter;
private final CorsConfigurationSource corsConfigurationSource;
@Bean
public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
http
// Enable CORS
.cors(cors -> cors.configurationSource(corsConfigurationSource))
// Disable CSRF (stateless API with token auth)
.csrf(AbstractHttpConfigurer::disable)

View File

@@ -2,6 +2,7 @@ package com.osleague.groupironmen.repository;
import com.osleague.groupironmen.model.Member;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
@@ -45,13 +46,13 @@ AND m.lastUpdated >= :fromTime
);
/**
* Find a member by group ID and member name.
* Find a member by group ID and member name (case-insensitive).
*
* @param groupId The group ID
* @param memberName The member name
* @return Optional containing the member if found
*/
@Query("SELECT m FROM Member m WHERE m.group.groupId = :groupId AND m.memberName = :memberName")
@Query("SELECT m FROM Member m WHERE m.group.groupId = :groupId AND LOWER(m.memberName) = LOWER(:memberName)")
Optional<Member> findByGroupIdAndMemberName(
@Param("groupId") Long groupId,
@Param("memberName") String memberName
@@ -68,21 +69,23 @@ AND m.lastUpdated >= :fromTime
int countByGroupId(@Param("groupId") Long groupId);
/**
* Delete a member by group ID and member name.
* Delete a member by group ID and member name (case-insensitive).
*
* @param groupId The group ID
* @param memberName The member name
*/
void deleteByGroupGroupIdAndMemberName(Long groupId, String memberName);
@Modifying
@Query("DELETE FROM Member m WHERE m.group.groupId = :groupId AND LOWER(m.memberName) = LOWER(:memberName)")
void deleteByGroupGroupIdAndMemberName(@Param("groupId") Long groupId, @Param("memberName") String memberName);
/**
* Check if a member exists in a group.
* Check if a member exists in a group (case-insensitive).
*
* @param groupId The group ID
* @param memberName The member name
* @return true if member exists
*/
@Query("SELECT CASE WHEN COUNT(m) > 0 THEN true ELSE false END FROM Member m WHERE m.group.groupId = :groupId AND m.memberName = :memberName")
@Query("SELECT CASE WHEN COUNT(m) > 0 THEN true ELSE false END FROM Member m WHERE m.group.groupId = :groupId AND LOWER(m.memberName) = LOWER(:memberName)")
boolean existsByGroupIdAndMemberName(
@Param("groupId") Long groupId,
@Param("memberName") String memberName