Exemplo n.º 1
0
        public async Task <WebRedirectResult> Execute(int appID)
        {
            var app = await factory.Apps().App(appID);

            var hubApp = await factory.Apps().App(HubInfo.AppKey);

            var appsModCategory = await hubApp.ModCategory(HubInfo.ModCategories.Apps);

            var modifier = await appsModCategory.Modifier(app.ID.Value);

            var redirectPath = path
                               .WithNewGroup(hubApi.App.Index.Path)
                               .WithModifier(modifier.ModKey());

            return(new WebRedirectResult(redirectPath.Format()));
        }
Exemplo n.º 2
0
        public async Task <WebRedirectResult> Execute(RedirectToAppUserRequest model)
        {
            var app = await factory.Apps().App(model.AppID);

            var hubApp = await factory.Apps().App(HubInfo.AppKey);

            var appsModCategory = await hubApp.ModCategory(HubInfo.ModCategories.Apps);

            var modifier = await appsModCategory.Modifier(app.ID.Value);

            var redirectPath = path
                               .WithNewGroup(hubApi.AppUser.Index.Path)
                               .WithModifier(modifier.ModKey());
            var url = $"{redirectPath.Format()}?userID={model.UserID}";

            return(new WebRedirectResult(url));
        }