- Added a new endpoint for changing usernames, allowing users to update their login credentials via the API. - Integrated username change functionality into the settings page, providing a user-friendly interface for this action. - Enhanced the Telegram bot to support user registration directly through the bot, including username generation and password delivery. - Updated documentation to reflect the new username change endpoint and registration flow through the Telegram bot.
19 lines
849 B
C#
19 lines
849 B
C#
using PnvPanel.Application.Common.Models;
|
|
|
|
namespace PnvPanel.Application.Telegram;
|
|
|
|
public static class TelegramErrors
|
|
{
|
|
public static readonly Error LinkTokenNotFound =
|
|
Error.NotFound("Telegram.LinkTokenNotFound", "Токен привязки не найден или истёк.");
|
|
|
|
public static readonly Error LoginRequestNotFound =
|
|
Error.NotFound("Telegram.LoginRequestNotFound", "Запрос на вход не найден.");
|
|
|
|
public static readonly Error NotLinked =
|
|
Error.Conflict("Telegram.NotLinked", "Telegram не привязан ни к одному аккаунту.");
|
|
|
|
public static readonly Error AlreadyLinked =
|
|
Error.Conflict("Telegram.AlreadyLinked", "Этот Telegram уже привязан к аккаунту — используйте вход через Telegram.");
|
|
}
|