Add sorting columns
This commit is contained in:
parent
adf24cbd5c
commit
90adbcfb7c
34 changed files with 833 additions and 80 deletions
|
|
@ -54,9 +54,9 @@ namespace Start.Server.Controllers {
|
|||
[Route("Create")]
|
||||
[ProducesResponseType(StatusCodes.Status201Created, Type = typeof(BookmarkContainerDto))]
|
||||
[ProducesResponseType(StatusCodes.Status400BadRequest)]
|
||||
public async Task<IActionResult> CreateBookmarkContainer([FromBody] string title) {
|
||||
public async Task<IActionResult> CreateBookmarkContainer(string title, int sortOrder) {
|
||||
BookmarkContainerDto? container = (await this.bookmarkContainerService
|
||||
.CreateBookmarkContainer(this.GetAuthorizedUserId(), title))
|
||||
.CreateBookmarkContainer(this.GetAuthorizedUserId(), title, sortOrder))
|
||||
?.MapToDto();
|
||||
|
||||
if (container == null)
|
||||
|
|
|
|||
|
|
@ -37,9 +37,9 @@ namespace Start.Server.Controllers {
|
|||
[ProducesResponseType(StatusCodes.Status201Created, Type = typeof(BookmarkGroupDto))]
|
||||
[ProducesResponseType(StatusCodes.Status400BadRequest)]
|
||||
public async Task<IActionResult> CreateBookmarkGroup(string title, string color,
|
||||
int bookmarkContainerId) {
|
||||
int sortOrder, int bookmarkContainerId) {
|
||||
BookmarkGroup? newGroup = await this.bookmarkGroupService
|
||||
.CreateBookmarkGroup(this.GetAuthorizedUserId(), title, color, bookmarkContainerId);
|
||||
.CreateBookmarkGroup(this.GetAuthorizedUserId(), title, color, sortOrder, bookmarkContainerId);
|
||||
|
||||
if (newGroup == null)
|
||||
return BadRequest();
|
||||
|
|
|
|||
|
|
@ -37,9 +37,10 @@ namespace Start.Server.Controllers {
|
|||
[ProducesResponseType(StatusCodes.Status201Created, Type = typeof(BookmarkDto))]
|
||||
[ProducesResponseType(StatusCodes.Status400BadRequest)]
|
||||
public async Task<IActionResult> CreateBookmark(string title, string url, string? notes,
|
||||
int bookmarkGroupId) {
|
||||
int sortOrder, int bookmarkGroupId) {
|
||||
BookmarkDto? bookmark = (await this.bookmarkService
|
||||
.CreateBookmark(this.GetAuthorizedUserId(), title, url, notes, bookmarkGroupId))
|
||||
.CreateBookmark(this.GetAuthorizedUserId(), title, url, notes, sortOrder,
|
||||
bookmarkGroupId))
|
||||
?.MapToDto();
|
||||
|
||||
if (bookmark == null)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue