Skip to content

Commit

Permalink
Remove Group from SeriesController.cs
Browse files Browse the repository at this point in the history
Signed-off-by: da3dsoul <[email protected]>
  • Loading branch information
da3dsoul committed Aug 28, 2020
1 parent ad17166 commit fc64486
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions Shoko.Server/API/v3/Controllers/SeriesController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -121,22 +121,6 @@ public ActionResult<List<Role>> GetSeriesCast(int id)
if (!User.AllowedSeries(ser)) return BadRequest("Series not allowed for current user");
return Series.GetCast(HttpContext, ser.AniDB_ID);
}

/// <summary>
/// Get the group for a series ID
/// </summary>
/// <param name="seriesID">Shoko ID</param>
/// <returns></returns>
[HttpGet("{seriesID}/Group")]
public ActionResult<Group> GetGroup(int seriesID)
{
var series = RepoFactory.AnimeSeries.GetByID(seriesID);
if (series == null) return BadRequest("No Series with ID");
if (!User.AllowedSeries(series)) return BadRequest("Series not allowed for current user");
var grp = series.AnimeGroup;
if (grp == null) return BadRequest("No Group for Series");
return new Group(HttpContext, grp);
}

/// <summary>
/// Move the series to a new group, and update accordingly
Expand Down

0 comments on commit fc64486

Please sign in to comment.