rework: A5 no-hit-seed rationale comment + spell-level range via use import (WI-2 2B findings, issue #2)

This commit is contained in:
Jan-Peter von Hunnius 2026-10-03 17:46:05 +02:00
parent f0659421e7
commit c613142bd4
2 changed files with 5 additions and 3 deletions

View file

@ -5,6 +5,7 @@ use axum::extract::{Path, Query, State};
use axum::routing::{get, post};
use axum::{Extension, Json, Router};
use sb_core::character::{self, CLASSES, GYM_STAT_DISPLAY_ORDER, RACES, TRAINING_GROUNDS};
use sb_core::constants::{MAX_SPELL_LEVEL, MIN_SPELL_LEVEL};
use sb_core::data;
use sb_core::items;
use sb_core::services as domain;
@ -1141,9 +1142,7 @@ async fn learn_spell_level(
return Err(axum::http::StatusCode::FORBIDDEN);
}
if !(sb_core::constants::MIN_SPELL_LEVEL..=sb_core::constants::MAX_SPELL_LEVEL)
.contains(&spell_level)
{
if !(MIN_SPELL_LEVEL..=MAX_SPELL_LEVEL).contains(&spell_level) {
return Err(axum::http::StatusCode::BAD_REQUEST);
}