Example #1
0
        public async Task <IActionResult> DeleteApp(DeleteAppAddressModel model)
        {
            var app = await _appRepo.GetApp(model.AccessToken);

            if (app.AppId != model.AppId)
            {
                return(this.Protocol(ErrorType.Unauthorized, "The app you try to delete is not the access token you granted!"));
            }
            await _appRepo.DeleteApp(app);

            return(this.Protocol(ErrorType.HasDoneAlready, "That app do not exists in our database."));
        }