Improve validation and error handling in Controller methods
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using Oqtane.Models;
|
||||
|
||||
namespace Oqtane.Repository
|
||||
@ -9,6 +9,7 @@ namespace Oqtane.Repository
|
||||
Module AddModule(Module module);
|
||||
Module UpdateModule(Module module);
|
||||
Module GetModule(int moduleId);
|
||||
Module GetModule(int moduleId, bool tracking);
|
||||
void DeleteModule(int moduleId);
|
||||
string ExportModule(int moduleId);
|
||||
bool ImportModule(int moduleId, string content);
|
||||
|
@ -1,4 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using Oqtane.Models;
|
||||
|
||||
namespace Oqtane.Repository
|
||||
@ -9,6 +9,7 @@ namespace Oqtane.Repository
|
||||
Notification AddNotification(Notification notification);
|
||||
Notification UpdateNotification(Notification notification);
|
||||
Notification GetNotification(int notificationId);
|
||||
Notification GetNotification(int notificationId, bool tracking);
|
||||
void DeleteNotification(int notificationId);
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using Oqtane.Models;
|
||||
|
||||
namespace Oqtane.Repository
|
||||
@ -10,6 +10,7 @@ namespace Oqtane.Repository
|
||||
PageModule AddPageModule(PageModule pageModule);
|
||||
PageModule UpdatePageModule(PageModule pageModule);
|
||||
PageModule GetPageModule(int pageModuleId);
|
||||
PageModule GetPageModule(int pageModuleId, bool tracking);
|
||||
PageModule GetPageModule(int pageId, int moduleId);
|
||||
void DeletePageModule(int pageModuleId);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using Oqtane.Models;
|
||||
|
||||
namespace Oqtane.Repository
|
||||
@ -9,6 +9,7 @@ namespace Oqtane.Repository
|
||||
Page AddPage(Page page);
|
||||
Page UpdatePage(Page page);
|
||||
Page GetPage(int pageId);
|
||||
Page GetPage(int pageId, bool tracking);
|
||||
Page GetPage(int pageId, int userId);
|
||||
Page GetPage(string path, int siteId);
|
||||
void DeletePage(int pageId);
|
||||
|
@ -1,4 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using Oqtane.Models;
|
||||
|
||||
namespace Oqtane.Repository
|
||||
@ -9,6 +9,7 @@ namespace Oqtane.Repository
|
||||
Profile AddProfile(Profile profile);
|
||||
Profile UpdateProfile(Profile profile);
|
||||
Profile GetProfile(int profileId);
|
||||
Profile GetProfile(int profileId, bool tracking);
|
||||
void DeleteProfile(int profileId);
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using Oqtane.Models;
|
||||
|
||||
namespace Oqtane.Repository
|
||||
@ -10,6 +10,7 @@ namespace Oqtane.Repository
|
||||
Role AddRole(Role role);
|
||||
Role UpdateRole(Role role);
|
||||
Role GetRole(int roleId);
|
||||
Role GetRole(int roleId, bool tracking);
|
||||
void DeleteRole(int roleId);
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using Oqtane.Models;
|
||||
|
||||
namespace Oqtane.Repository
|
||||
@ -9,6 +9,7 @@ namespace Oqtane.Repository
|
||||
Site AddSite(Site site);
|
||||
Site UpdateSite(Site site);
|
||||
Site GetSite(int siteId);
|
||||
Site GetSite(int siteId, bool tracking);
|
||||
void DeleteSite(int siteId);
|
||||
void CreatePages(Site site, List<PageTemplate> pageTemplates);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using Oqtane.Models;
|
||||
|
||||
namespace Oqtane.Repository
|
||||
@ -9,6 +9,7 @@ namespace Oqtane.Repository
|
||||
User AddUser(User user);
|
||||
User UpdateUser(User user);
|
||||
User GetUser(int userId);
|
||||
User GetUser(int userId, bool tracking);
|
||||
User GetUser(string username);
|
||||
void DeleteUser(int userId);
|
||||
}
|
||||
|
@ -10,6 +10,7 @@ namespace Oqtane.Repository
|
||||
UserRole AddUserRole(UserRole userRole);
|
||||
UserRole UpdateUserRole(UserRole userRole);
|
||||
UserRole GetUserRole(int userRoleId);
|
||||
UserRole GetUserRole(int userRoleId, bool tracking);
|
||||
void DeleteUserRole(int userRoleId);
|
||||
void DeleteUserRoles(int userId);
|
||||
}
|
||||
|
Reference in New Issue
Block a user