Use DTOs in controller

This commit is contained in:
Neil Brommer 2021-11-15 21:44:16 -08:00
parent b52610e126
commit 106956157b
5 changed files with 56 additions and 11 deletions

View file

@ -19,7 +19,7 @@ namespace Start.Shared {
}
public BookmarkContainerDto(int bookmarkContainerId, string title,
IList<BookmarkGroupDto> bookmarkGroups) : this(bookmarkContainerId, title) {
IList<BookmarkGroupDto>? bookmarkGroups) : this(bookmarkContainerId, title) {
this.BookmarkGroups = bookmarkGroups;
}
}

View file

@ -23,7 +23,7 @@ namespace Start.Shared {
}
public BookmarkGroupDto(int bookmarkGroupId, string title, string color,
IList<BookmarkDto> bookmarks) : this(bookmarkGroupId, title, color) {
IList<BookmarkDto>? bookmarks) : this(bookmarkGroupId, title, color) {
this.Bookmarks = bookmarks;
}
}

View file

@ -0,0 +1,9 @@
using System;
namespace Start.Shared {
public enum BookmarkStatus {
OK = 1,
BookmarkDoesNotExist = 2,
OwnerDoesNotMatch = 3,
UserDoesNotExist = 4
}
}