Ejemplo n.º 1
0
        public async Task <IActionResult> EnableAdvertisement([FromRoute] int id)
        {
            if (UserType != Admin)
            {
                return(Unauthorized());
            }

            var advertisement = await AdvertisementService.Enable(id);

            await SubscriptionService.UpdateUserSubscription(advertisement.UserName);

            return(Ok());
        }