aboutsummaryrefslogtreecommitdiff
path: root/src/Services
diff options
context:
space:
mode:
authortranstrike <transtrike@gmail.com>2021-04-07 18:20:44 +0300
committertranstrike <transtrike@gmail.com>2021-04-07 18:20:44 +0300
commitf4eac9c89bef0c21d7ccb29cb0841fa621c79f46 (patch)
treefb17fa087095bc32977e6c399dbc98bdf1411120 /src/Services
parent51f911378773ffbcebb62b135010d46a1d9aa0d5 (diff)
downloadDevHive-f4eac9c89bef0c21d7ccb29cb0841fa621c79f46.tar
DevHive-f4eac9c89bef0c21d7ccb29cb0841fa621c79f46.tar.gz
DevHive-f4eac9c89bef0c21d7ccb29cb0841fa621c79f46.zip
Friends endpoint init
Diffstat (limited to 'src/Services')
-rw-r--r--src/Services/DevHive.Services/Interfaces/IFriendsService.cs11
-rw-r--r--src/Services/DevHive.Services/Services/FriendsService.cs34
2 files changed, 45 insertions, 0 deletions
diff --git a/src/Services/DevHive.Services/Interfaces/IFriendsService.cs b/src/Services/DevHive.Services/Interfaces/IFriendsService.cs
new file mode 100644
index 0000000..6ab7b90
--- /dev/null
+++ b/src/Services/DevHive.Services/Interfaces/IFriendsService.cs
@@ -0,0 +1,11 @@
+using System;
+using System.Threading.Tasks;
+
+namespace DevHive.Services.Interfaces
+{
+ public interface IFriendsService
+ {
+ Task<object> AddFriend(Guid userId, Guid friendId);
+ Task<object> RemoveFriend(Guid userId, Guid friendId);
+ }
+}
diff --git a/src/Services/DevHive.Services/Services/FriendsService.cs b/src/Services/DevHive.Services/Services/FriendsService.cs
new file mode 100644
index 0000000..7577572
--- /dev/null
+++ b/src/Services/DevHive.Services/Services/FriendsService.cs
@@ -0,0 +1,34 @@
+using System;
+using System.Threading.Tasks;
+using AutoMapper;
+using DevHive.Common.Jwt.Interfaces;
+using DevHive.Services.Interfaces;
+
+namespace DevHive.Services.Services
+{
+ public class FriendsService : IFriendsService
+ {
+ private readonly IUserService _userService;
+ private readonly IMapper _userMapper;
+ private readonly IJwtService _jwtService;
+
+ public FriendsService(IUserService userService,
+ IMapper mapper,
+ IJwtService jwtService)
+ {
+ this._userService = userService;
+ this._userMapper = mapper;
+ this._jwtService = jwtService;
+ }
+
+ public async Task<object> AddFriend(Guid userId, Guid friendId)
+ {
+ return new { Message = "FUCK YOU" };
+ }
+
+ public async Task<object> RemoveFriend(Guid userId, Guid friendId)
+ {
+ return new { Message = "FUCK YOU" };
+ }
+ }
+}