Правка архитектуры по бэку
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
namespace Knot.Shared.Kernel.Constants;
|
||||
|
||||
public static class Errors
|
||||
{
|
||||
public const string Unauthorized = "Не авторизован.";
|
||||
public const string Forbidden = "Доступ запрещен.";
|
||||
public const string NotFound = "Сущность не найдена.";
|
||||
public const string ValidationError = "Ошибка валидации.";
|
||||
public const string InternalServerError = "Внутренняя ошибка сервера.";
|
||||
public const string DisabledByAdmin = "Модуль отключен администратором.";
|
||||
public const string KlipyNotConfigured = "Ключ Klipy не настроен или модуль отключен.";
|
||||
public const string KlipyApiError = "Ошибка запроса к Klipy API.";
|
||||
public const string KlipySearchError = "Ошибка запроса к Klipy API при поиске.";
|
||||
public const string InvalidQuery = "Пустой запрос недопустим.";
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
namespace Knot.Shared.Kernel.Constants;
|
||||
|
||||
public static class Klipy
|
||||
{
|
||||
public const string ApiUrlCo = "https://api.klipy.co/api/v1/{0}/{1}?page=1&per_page=30&{2}&customer_id={3}";
|
||||
public const string ApiUrlCom = "https://api.klipy.com/api/v1/{0}/{1}?page=1&per_page=30&{2}&customer_id={3}";
|
||||
|
||||
public const string ResourceTrending = "gifs/trending";
|
||||
public const string ResourceSearch = "gifs/search";
|
||||
|
||||
public const int TrendingCacheMinutes = 60;
|
||||
public const int SearchCacheMinutes = 15;
|
||||
|
||||
public const string DefaultCustomerId = "anonymous";
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
namespace Knot.Shared.Kernel.Constants;
|
||||
|
||||
public enum Policies
|
||||
{
|
||||
AdminOnly
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace Knot.Shared.Kernel.Constants;
|
||||
|
||||
public enum Roles
|
||||
{
|
||||
Admin,
|
||||
User
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
namespace Knot.Shared.Kernel.Constants;
|
||||
|
||||
public static class Routes
|
||||
{
|
||||
public const string ApiAdmin = "/api/admin";
|
||||
public const string ApiAuth = "/api/auth";
|
||||
public const string ApiChats = "/api/chats";
|
||||
public const string ApiConfig = "/api/config";
|
||||
public const string ApiFederation = "/api/federation";
|
||||
public const string ApiFiles = "/api/files";
|
||||
public const string ApiFriends = "/api/friends";
|
||||
public const string ApiKlipy = "/api/klipy";
|
||||
public const string ApiMessages = "/api/messages";
|
||||
public const string ApiStories = "/api/stories";
|
||||
public const string ApiTelegramImport = "/api/telegram/import";
|
||||
public const string ApiUsers = "/api/users";
|
||||
public const string ApiWebRtc = "/api/webrtc";
|
||||
}
|
||||
Reference in New Issue
Block a user