feat: added DI to Client
This commit is contained in:
18
JOBot.TClient/Core/Services/UserService.cs
Normal file
18
JOBot.TClient/Core/Services/UserService.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using User = JOBot.Proto.User;
|
||||
|
||||
namespace JOBot.TClient.Core.Services;
|
||||
|
||||
public class UserService(User.UserClient client)
|
||||
{
|
||||
public async Task<bool> RegisterAsync(long userId, string? username)
|
||||
{
|
||||
|
||||
var response = await client.RegisterAsync(new()
|
||||
{
|
||||
UserId = userId,
|
||||
Username = username
|
||||
});
|
||||
|
||||
return response.Success;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user