Fix swagger authorization prompt hiding.
Add missing swagger documentation for action.
This commit is contained in:
Родитель
2a7eb9eed2
Коммит
7c84a1cf69
|
@ -282,4 +282,5 @@ __pycache__/
|
|||
PublishProfiles/
|
||||
src/Trackable.Web/wwwroot/dist/**
|
||||
!src/Trackable.Web/wwwroot/dist/swagger/
|
||||
!src/Trackable.Web/wwwroot/dist/swagger/swagger.css
|
||||
!src/Trackable.Web/wwwroot/dist/swagger/swagger.js
|
||||
|
|
|
@ -205,7 +205,7 @@ namespace Trackable.Web.Controllers
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Register TrackingPoints related to device, check geofences
|
||||
/// Register TrackingPoints related to device and check geofences
|
||||
/// </summary>
|
||||
/// <param name="id">The device id</param>
|
||||
/// <param name="points">List of TrackingPoints</param>
|
||||
|
|
|
@ -155,6 +155,11 @@ namespace Trackable.Web.Controllers
|
|||
return this.dtoMapper.Map<LocationDto>(result);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Delete location
|
||||
/// </summary>
|
||||
/// <param name="id">The location id</param>
|
||||
/// <returns>Ok response</returns>
|
||||
// DELETE api/locations/5
|
||||
[HttpDelete("{id}")]
|
||||
[Authorize(UserRoles.Administrator)]
|
||||
|
|
|
@ -169,7 +169,6 @@ namespace Trackable.Web
|
|||
return description.RelativePath.StartsWith("api");
|
||||
});
|
||||
|
||||
|
||||
var filePath = Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory, "Trackable.Web.xml");
|
||||
c.IncludeXmlComments(filePath);
|
||||
});
|
||||
|
@ -246,7 +245,7 @@ namespace Trackable.Web
|
|||
app.UseSwaggerUI(c =>
|
||||
{
|
||||
c.SwaggerEndpoint("/swagger/v1/swagger.json", "BMFT APIs V1");
|
||||
c.HeadContent = "<script type=\"application/javascript\" src=\"/swagger/swagger.js\"></script>";
|
||||
c.HeadContent = "<script type=\"application/javascript\" src=\"/swagger/swagger.js\"></script><link rel=\"stylesheet\" href=\"/swagger/swagger.css\">";
|
||||
c.DocumentTitle = "BMFT Swagger";
|
||||
});
|
||||
}
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
.swagger-ui .scheme-container {
|
||||
display: none;
|
||||
}
|
|
@ -7,9 +7,6 @@ xhttp.onreadystatechange = function () {
|
|||
if (this.readyState == 4 && this.status != 200) {
|
||||
window.location.href = "../api/users/login?redirectUri=" + window.location.href;
|
||||
}
|
||||
if (document.getElementsByClassName('auth-wrapper')) {
|
||||
document.getElementsByClassName('auth-wrapper')[0].parentNode.parentNode.style.display = 'none';
|
||||
}
|
||||
};
|
||||
xhttp.open("GET", "../api/users/me", true);
|
||||
xhttp.send();
|
||||
xhttp.send();
|
Загрузка…
Ссылка в новой задаче