Example #1
0
        public IActionResult Delete(string id)
        {
            var comment = _tokenService.GetApiKey(id);
            var result  = comment.Result;

            if (result == null)
            {
                return(NotFound());
            }

            _tokenService.Delete(result.Key);

            return(NoContent());
        }
Example #2
0
        // DELETE: odata/Tokens(5)
        public async Task <IHttpActionResult> Delete([FromODataUri] string key)
        {
            await _tokenService.Delete(key);

            return(StatusCode(HttpStatusCode.NoContent));
        }