Exemple #1
0
        public async Task <ActionResult <NotificationRequest> > GoogleDrive()
        {
            var number = Request.Headers["X-Goog-Message-Number"];

            if (int.TryParse(number, out int res))
            {
                // Ignore Sync request
                if (res == 1)
                {
                    return(Ok());
                }

                var channelID = Request.Headers["X-Goog-Channel-ID"];

                await _migService.GoogleDriveWebhookMigrationAsync(channelID.ToString());

                return(Ok());
            }

            return(BadRequest());
        }