package com.talentcard.server.business.auth;
|
|
import java.util.Map;
|
|
import com.talentcard.server.common.ApiResponse;
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RestController;
|
|
/** Local payment-link debugging only. The controller is absent unless explicitly enabled. */
|
@RestController
|
@RequestMapping("/api/app/auth")
|
@ConditionalOnProperty(prefix = "app.development-session", name = "enabled", havingValue = "true")
|
public class DevelopmentSessionController {
|
|
private final TalentAuthService talentAuthService;
|
private final DevelopmentSessionProperties properties;
|
|
public DevelopmentSessionController(TalentAuthService talentAuthService, DevelopmentSessionProperties properties) {
|
this.talentAuthService = talentAuthService;
|
this.properties = properties;
|
}
|
|
@PostMapping("/development-session")
|
public ApiResponse<Map<String, Object>> create() {
|
return ApiResponse.success(talentAuthService.createDevelopmentSession(properties.getTalentId()));
|
}
|
}
|