Отформатировать списки параметров по код-стайлу
Больше двух параметров — каждый на отдельной строке (закрывающая скобка в конце последнего); два и меньше — в одну строку. Правило добавлено в docs/spec/Код-стайл-Дейл.md; применено к 628 сигнатурам в 253 файлах.
This commit is contained in:
@@ -100,7 +100,11 @@ public static class CardsEndpoints
|
||||
|
||||
// GET /api/cards?containerId=: карточки контейнера (или все карточки дашборда); 400 «Неизвестный контейнер».
|
||||
// Параметр col принят как алиас containerId (совместимость со старым фронтом).
|
||||
private static async Task<IResult> ListCardsAsync(string? containerId, string? col, HttpContext context, CancellationToken ct)
|
||||
private static async Task<IResult> ListCardsAsync(
|
||||
string? containerId,
|
||||
string? col,
|
||||
HttpContext context,
|
||||
CancellationToken ct)
|
||||
{
|
||||
if (!context.HasUser())
|
||||
{
|
||||
@@ -143,7 +147,10 @@ public static class CardsEndpoints
|
||||
}
|
||||
|
||||
// GET /api/cards/{cardId}: одна карточка; 404 «Карточка не найдена» (L166–168).
|
||||
private static async Task<IResult> GetCardAsync(string cardId, HttpContext context, CancellationToken ct)
|
||||
private static async Task<IResult> GetCardAsync(
|
||||
string cardId,
|
||||
HttpContext context,
|
||||
CancellationToken ct)
|
||||
{
|
||||
if (!context.HasUser())
|
||||
{
|
||||
@@ -171,7 +178,10 @@ public static class CardsEndpoints
|
||||
}
|
||||
|
||||
// POST /api/cards/mark-col-seen: снять «новое» с колонки (L187–191); ответ {ok:true}.
|
||||
private static async Task<IResult> MarkColSeenAsync(MarkColBody body, HttpContext context, CancellationToken ct)
|
||||
private static async Task<IResult> MarkColSeenAsync(
|
||||
MarkColBody body,
|
||||
HttpContext context,
|
||||
CancellationToken ct)
|
||||
{
|
||||
if (!context.HasUser())
|
||||
{
|
||||
@@ -195,7 +205,11 @@ public static class CardsEndpoints
|
||||
// доменный механизм перехода ICardMover: стадия — запись истории и сброс напоминания
|
||||
// (move_stage), дашборд-контейнер — журнал/обучение ML. Ответ — обновлённая карточка; 400 при
|
||||
// несуществующем контейнере, 404 — карточки нет.
|
||||
private static async Task<IResult> MoveAsync(string cardId, MoveBody body, HttpContext context, CancellationToken ct)
|
||||
private static async Task<IResult> MoveAsync(
|
||||
string cardId,
|
||||
MoveBody body,
|
||||
HttpContext context,
|
||||
CancellationToken ct)
|
||||
{
|
||||
if (!context.HasUser())
|
||||
{
|
||||
@@ -225,7 +239,10 @@ public static class CardsEndpoints
|
||||
}
|
||||
|
||||
// POST /api/cards/{cardId}/trash: в корзину + обучение ML spam (L203–207); ответ {ok:true}; 404.
|
||||
private static async Task<IResult> TrashAsync(string cardId, HttpContext context, CancellationToken ct)
|
||||
private static async Task<IResult> TrashAsync(
|
||||
string cardId,
|
||||
HttpContext context,
|
||||
CancellationToken ct)
|
||||
{
|
||||
if (!context.HasUser())
|
||||
{
|
||||
@@ -245,7 +262,10 @@ public static class CardsEndpoints
|
||||
}
|
||||
|
||||
// POST /api/cards/{cardId}/restore: возврат из архив/корзины на канбан (L210–214); ответ {ok, col}; 404.
|
||||
private static async Task<IResult> RestoreAsync(string cardId, HttpContext context, CancellationToken ct)
|
||||
private static async Task<IResult> RestoreAsync(
|
||||
string cardId,
|
||||
HttpContext context,
|
||||
CancellationToken ct)
|
||||
{
|
||||
if (!context.HasUser())
|
||||
{
|
||||
@@ -265,7 +285,10 @@ public static class CardsEndpoints
|
||||
}
|
||||
|
||||
// DELETE /api/cards/{cardId}: удалить навсегда (Cards + комментарии; L217–221); ответ {ok:true}; 404.
|
||||
private static async Task<IResult> DeleteAsync(string cardId, HttpContext context, CancellationToken ct)
|
||||
private static async Task<IResult> DeleteAsync(
|
||||
string cardId,
|
||||
HttpContext context,
|
||||
CancellationToken ct)
|
||||
{
|
||||
if (!context.HasUser())
|
||||
{
|
||||
@@ -285,7 +308,10 @@ public static class CardsEndpoints
|
||||
}
|
||||
|
||||
// POST /api/cards/clear-col {col}: очистить корзину/архив (L228–235); ответ {ok, cleared}; 400.
|
||||
private static async Task<IResult> ClearColAsync(ClearColBody body, HttpContext context, CancellationToken ct)
|
||||
private static async Task<IResult> ClearColAsync(
|
||||
ClearColBody body,
|
||||
HttpContext context,
|
||||
CancellationToken ct)
|
||||
{
|
||||
if (!context.HasUser())
|
||||
{
|
||||
@@ -300,7 +326,11 @@ public static class CardsEndpoints
|
||||
}
|
||||
|
||||
// POST /api/cards/{cardId}/comments {text}: добавить комментарий (L238–242); ответ {comments}; 400 «Пустой комментарий»; 404.
|
||||
private static async Task<IResult> AddCommentAsync(string cardId, CommentBody body, HttpContext context, CancellationToken ct)
|
||||
private static async Task<IResult> AddCommentAsync(
|
||||
string cardId,
|
||||
CommentBody body,
|
||||
HttpContext context,
|
||||
CancellationToken ct)
|
||||
{
|
||||
if (!context.HasUser())
|
||||
{
|
||||
@@ -332,7 +362,10 @@ public static class CardsEndpoints
|
||||
// body: Тело запроса (ids — опционально).
|
||||
// context: Контекст запроса.
|
||||
// ct: Токен отмены.
|
||||
private static async Task<IResult> ReclassifyAsync(ReclassifyBody? body, HttpContext context, CancellationToken ct)
|
||||
private static async Task<IResult> ReclassifyAsync(
|
||||
ReclassifyBody? body,
|
||||
HttpContext context,
|
||||
CancellationToken ct)
|
||||
{
|
||||
if (!context.HasUser())
|
||||
{
|
||||
@@ -350,7 +383,10 @@ public static class CardsEndpoints
|
||||
// cardId: Id карточки (c_...).
|
||||
// context: Контекст запроса.
|
||||
// ct: Токен отмены.
|
||||
private static async Task<IResult> ReclassifyOneAsync(string cardId, HttpContext context, CancellationToken ct)
|
||||
private static async Task<IResult> ReclassifyOneAsync(
|
||||
string cardId,
|
||||
HttpContext context,
|
||||
CancellationToken ct)
|
||||
{
|
||||
if (!context.HasUser())
|
||||
{
|
||||
@@ -412,7 +448,10 @@ public static class CardsEndpoints
|
||||
// context: Контекст запроса.
|
||||
// result: Итог прохода.
|
||||
// ct: Токен отмены.
|
||||
private static Task AppendReclassifyAuditAsync(HttpContext context, ReclassifyResultDto result, CancellationToken ct)
|
||||
private static Task AppendReclassifyAuditAsync(
|
||||
HttpContext context,
|
||||
ReclassifyResultDto result,
|
||||
CancellationToken ct)
|
||||
{
|
||||
if (result.Reclassified == 0)
|
||||
{
|
||||
@@ -427,7 +466,10 @@ public static class CardsEndpoints
|
||||
}
|
||||
|
||||
// GET /api/search?q=: поиск карточек (FTS + LIKE, Ruling 6/Task 12; dashboard_routes L254–256). Ответ {leads, messages: []}.
|
||||
private static async Task<IResult> SearchAsync(string? q, HttpContext context, CancellationToken ct)
|
||||
private static async Task<IResult> SearchAsync(
|
||||
string? q,
|
||||
HttpContext context,
|
||||
CancellationToken ct)
|
||||
{
|
||||
if (!context.HasUser())
|
||||
{
|
||||
@@ -448,7 +490,10 @@ public static class CardsEndpoints
|
||||
// context: Контекст запроса (для резолва ContainersService).
|
||||
// ct: Токен отмены.
|
||||
// Возвращает: True — контейнер допустим для фильтра.
|
||||
private static async Task<bool> IsKnownContainerAsync(string col, HttpContext context, CancellationToken ct)
|
||||
private static async Task<bool> IsKnownContainerAsync(
|
||||
string col,
|
||||
HttpContext context,
|
||||
CancellationToken ct)
|
||||
{
|
||||
ContainersService containers = context.RequestServices.GetRequiredService<ContainersService>();
|
||||
return await containers.GetAsync(col, ct) is not null;
|
||||
|
||||
Reference in New Issue
Block a user