Beispiel #1
0
        public static async Task InitializeAsync(string tenant, LoginView meta)
        {
            await DayEnd.InitializeAsync(tenant, meta.UserId, meta.OfficeId).ConfigureAwait(true);

            RevokeLogins(tenant, meta.UserId);
            await SendNotificationAsync(tenant, meta).ConfigureAwait(false);
        }
        public async Task <ActionResult> InitializeAsync()
        {
            var meta = await AppUsers.GetCurrentAsync().ConfigureAwait(true);

            string tenant = this.Tenant;

            try
            {
                await DayEnd.InitializeAsync(tenant, meta.UserId, meta.OfficeId).ConfigureAwait(true);

                EodProcessing.RevokeLogins(tenant, meta.UserId);

                return(this.Ok());
            }
            catch (Exception ex)
            {
                return(this.Failed(ex.Message, HttpStatusCode.InternalServerError));
            }
        }