Commit 7628833c authored by Eric Dieckman's avatar Eric Dieckman
Browse files

Change CreateAtAction to CreatedAtRoute

parent 158ba841
Loading
Loading
Loading
Loading
+7 −31
Original line number Diff line number Diff line
@@ -44,18 +44,6 @@
            Get all locations for supplied vlan
            </summary>
        </member>
        <member name="M:Cals.Visor.Api.Identity.ApplicationBuildingExtensions.UseAppIdentity(Microsoft.AspNetCore.Builder.IApplicationBuilder)">
            <summary>
            Enables use of the Visor user identity.
            </summary>
            <param name="app"></param>
            <returns></returns>
        </member>
        <member name="M:Cals.Visor.Api.Identity.ApplicationBuildingExtensions.UseAppIdentity(Microsoft.AspNetCore.Builder.IApplicationBuilder,Cals.Visor.Api.Identity.IdentityUserOptions)">
            <summary>
            Enables Visor user with the given options.
            </summary>
        </member>
        <member name="T:Cals.Visor.Api.Identity.DevAuthenticationDefaults">
            <summary>
            Default values for Shibboleth authentication middleware
@@ -143,30 +131,18 @@
            Length of time a token is valid
            </summary>
        </member>
        <member name="T:Cals.Visor.Api.Identity.IdentityMiddleware">
            <summary>
            Middleware to add this app user's identity to the ClaimsPrincipal.
            </summary>
        </member>
        <member name="M:Cals.Visor.Api.Identity.IdentityMiddleware.#ctor(Microsoft.AspNetCore.Http.RequestDelegate,Microsoft.Extensions.Options.IOptions{Cals.Visor.Api.Identity.IdentityUserOptions},Microsoft.Extensions.Logging.ILoggerFactory)">
            <summary>
            Initializes a new instance of the <see cref="T:Cals.Visor.Api.Identity.IdentityMiddleware"/> class.
            </summary>
            <param name="next">The next middleware in the pipeline.</param>
            <param name="options">The configuration options.</param>
            <param name="loggerFactory">An <see cref="T:Microsoft.Extensions.Logging.ILoggerFactory"/> instance used to create loggers.</param>
        </member>
        <member name="M:Cals.Visor.Api.Identity.IdentityMiddleware.Invoke(Microsoft.AspNetCore.Http.HttpContext)">
        <member name="T:Cals.Visor.Api.Identity.IdentityUserOptions">
            <summary>
            Processes a request to add the Visor identity to the user principal.
            Options for Identity Middleware.
            </summary>
            <param name="context"></param>
            <returns></returns>
        </member>
        <member name="T:Cals.Visor.Api.Identity.IdentityUserOptions">
        <member name="T:Cals.Visor.Api.Middleware.CorrelationIdMiddleware">
            <summary>
            Options for Identity Middleware.
            Middleware to attach a unique correlation ID to every request
            </summary>
            <remarks>
            All changes inside one API call can be grouped
            </remarks>
        </member>
        <member name="T:Cals.Visor.Identity.VisorUser">
            <summary>
+1 −2
Original line number Diff line number Diff line
@@ -49,7 +49,7 @@ public class LocationsController : ControllerBase
        _context.Add(data);
        await _context.SaveChangesAsync();

        return CreatedAtAction(nameof(GetByIdAsync), new { locationId = data.LocationId }, data);
        return CreatedAtRoute("GetLocationById", new { locationId = data.LocationId }, data);
    }

    // PUT: /locations/2
@@ -87,7 +87,6 @@ public class LocationsController : ControllerBase
        if (entity == null)
            return NotFound();


        List<Vlan?> vlans = await _context.LocationVlans
            .Where(lv => lv.LocationId == locationId)
            .Select(lv => lv.Vlan)
+1 −1
Original line number Diff line number Diff line
@@ -48,7 +48,7 @@ public class PaloAltoAccessDomainsController : ControllerBase
        _context.Add(data);
        await _context.SaveChangesAsync();

        return CreatedAtAction(nameof(GetByIdAsync), new { accessDomainId = data.AccessDomainId }, data);
        return CreatedAtRoute("GetAccessDomainById", new { accessDomainId = data.AccessDomainId }, data);
    }

    // PUT: /api/palo_alto/access_domains/1
+1 −1
Original line number Diff line number Diff line
@@ -50,7 +50,7 @@ public class SubnetsController : ControllerBase
        _context.Add(data);
        await _context.SaveChangesAsync();

        return CreatedAtAction(nameof(GetByIdAsync), new { subnetId = data.SubnetId }, data);
        return CreatedAtRoute("GetSubnetById", new { subnetId = data.SubnetId }, data);
    }

    // PUT: /api/subnets/2
+1 −1
Original line number Diff line number Diff line
@@ -48,7 +48,7 @@ public class VlansController : ControllerBase
        _context.Add(data);
        await _context.SaveChangesAsync();

        return CreatedAtAction(nameof(GetByIdAsync), new { vlanId = data.VlanId }, data);
        return CreatedAtRoute("GetVlanById", new { vlanId = data.VlanId }, data);
    }

    // PUT: /vlans/2
Loading