コード例 #1
0
        public ActionResult Delete(string themeName)
        {
            try
            {
                var remover = new ThemeRemover(themeName);
                remover.Remove();
            }
            catch (ThemeRemoveException ex)
            {
                return this.AjaxFail(ex.Message, HttpStatusCode.InternalServerError);
            }

            return Json(new { success = true }, JsonRequestBehavior.AllowGet);
        }
コード例 #2
0
ファイル: ThemeController.cs プロジェクト: frapid/frapid
        public async Task<ActionResult> DeleteAsync(string themeName)
        {
            try
            {
                var remover = new ThemeRemover(this.Tenant, themeName);
                await remover.RemoveAsync().ConfigureAwait(false);
            }
            catch(ThemeRemoveException ex)
            {
                return this.Failed(ex.Message, HttpStatusCode.InternalServerError);
            }

            return this.Ok();
        }