public async Task <IActionResult> DeleteSeminarById([FromRoute] long seminarId) { if (User.Type() != Type.Teacher) { return(StatusCode(403, new { msg = "权限不足" })); } try { await _seminarService.DeleteSeminarBySeminarIdAsync(seminarId); return(NoContent()); } catch (SeminarNotFoundException) { return(StatusCode(404, new { msg = "讨论课不存在" })); } catch (ArgumentException) { return(StatusCode(400, new { msg = "讨论课ID输入格式有误" })); } }