Allow amateur performer profiles

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Paul Schneider 2026-11-08 02:29:09 +00:00
commit 0728d2a3f7
Signed by: notazof
GPG key ID: AD4B9B545FBD7D12
20 changed files with 217 additions and 29 deletions

View file

@ -616,6 +616,12 @@ namespace Yavsc.WebApi.Controllers
return BadRequest(new { error = "Payload is required." });
}
model.SIREN = model.SIREN?.Trim() ?? string.Empty;
if (string.IsNullOrWhiteSpace(model.ExerciseCountryCode))
{
model.ExerciseCountryCode = "fr";
}
var uid = User.GetUserId();
if (string.IsNullOrWhiteSpace(uid))
{
@ -652,11 +658,6 @@ namespace Yavsc.WebApi.Controllers
return NotFound();
}
if (string.IsNullOrWhiteSpace(model.ExerciseCountryCode))
{
model.ExerciseCountryCode = "fr";
}
var profile = await _dbContext.Performers.FirstOrDefaultAsync(p => p.PerformerId == uid);
if (profile is null)
{