Example #1
0
    public async Task <int> OnAdd([FromBody] UpdateTesterFiles input)
    {
        if (!await this.VerifySession(_manager) || !await this.VerifyAdmin(_query))
        {
            Response.StatusCode = 403;
            return(-1);
        }

        if (!input.IsLikelyValid())
        {
            Response.StatusCode = 400;
            return(-1);
        }

        return(await _query.AddTest(input.TestName, input.TestDescription, input.Included, input.Testers, input.Required));
    }