Esempio n. 1
0
        public async Task <IActionResult> DeleteOriginalFiles(GalleryItem[] galleryItems)
        {
            // DELETE galleryitems/deleteoriginalfiles
            try
            {
                return(new JsonResult(await _galleryObjectController.DeleteOriginalFiles(galleryItems)));
            }
            catch (Exception ex)
            {
                AppEventController.LogError(ex);

                return(StatusCode(500, _exController.GetExString(ex)));
            }
        }
        public ActionResult DeleteOriginalFiles(GalleryItem[] galleryItems)
        {
            // DELETE galleryitems/deleteoriginalfiles
            try
            {
                return(GalleryObjectController.DeleteOriginalFiles(galleryItems));
            }
            catch (Exception ex)
            {
                AppEventController.LogError(ex);

                throw new HttpResponseException(new HttpResponseMessage(HttpStatusCode.InternalServerError)
                {
                    Content      = Utils.GetExStringContent(ex),
                    ReasonPhrase = "Server Error"
                });
            }
        }