コード例 #1
0
        public async Task <IActionResult> AddToWisherRight(Guid orgId)
        {
            try
            {
                await organizationManager.AddToWishers(orgId, GetCurrentUserId());

                return(Ok());
            }
            catch (ArgumentNullException ane)
            {
                logger.LogDebug(ane.Message + "\n" + ane.StackTrace);
                return(NotFound("Can't find organization, user or right"));
            }
            catch (InvalidOperationException ioe)
            {
                logger.LogDebug(ioe.Message + "\n" + ioe.StackTrace);
                return(NotFound("Can't find organization, user or right"));
            }
            catch (Exception ex)
            {
                logger.LogDebug(ex.Message + "\n" + ex.StackTrace);
                return(StatusCode(500));
            }
        }