aboutsummaryrefslogtreecommitdiff
path: root/src/Services/DevHive.Services/Interfaces/IProfilePictureService.cs
diff options
context:
space:
mode:
authorVictor S <57849063+transtrike@users.noreply.github.com>2021-04-02 23:55:25 +0300
committerGitHub <noreply@github.com>2021-04-02 23:55:25 +0300
commitbad7456b379bcc683431e2279591f7c5227bd55a (patch)
treeb82e15d10e28759dcd066b38ccdd16c23753b33c /src/Services/DevHive.Services/Interfaces/IProfilePictureService.cs
parent2448c4d31188aed26605c5e3c282bacc3bd71ae5 (diff)
parentb0c6c6e1795a1cc8fe82a60ce16a263ab4cad397 (diff)
downloadDevHive-bad7456b379bcc683431e2279591f7c5227bd55a.tar
DevHive-bad7456b379bcc683431e2279591f7c5227bd55a.tar.gz
DevHive-bad7456b379bcc683431e2279591f7c5227bd55a.zip
Merge pull request #24 from Team-Kaleidoscope/feature/profile_picture_implementation
- Removed InsertProfilePicture from Service layer (unneeded) - ReadProfilePicture endpoint implemented
Diffstat (limited to 'src/Services/DevHive.Services/Interfaces/IProfilePictureService.cs')
-rw-r--r--src/Services/DevHive.Services/Interfaces/IProfilePictureService.cs30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/Services/DevHive.Services/Interfaces/IProfilePictureService.cs b/src/Services/DevHive.Services/Interfaces/IProfilePictureService.cs
new file mode 100644
index 0000000..edf2775
--- /dev/null
+++ b/src/Services/DevHive.Services/Interfaces/IProfilePictureService.cs
@@ -0,0 +1,30 @@
+using System;
+using System.Threading.Tasks;
+using DevHive.Services.Models.ProfilePicture;
+
+namespace DevHive.Services.Interfaces
+{
+ public interface IProfilePictureService
+ {
+ /// <summary>
+ /// Get a profile picture by it's Guid
+ /// </summary>
+ /// <param name="id">Profile picture's Guid</param>
+ /// <returns>The profile picture's URL in the cloud</returns>
+ Task<string> GetProfilePictureById(Guid id);
+
+ /// <summary>
+ /// Uploads the given picture and assigns it's link to the user in the database
+ /// </summary>
+ /// <param name="profilePictureServiceModel">Contains User's Guid and the new picture to be updated</param>
+ /// <returns>The new profile picture's URL in the cloud</returns>
+ Task<string> UpdateProfilePicture(ProfilePictureServiceModel profilePictureServiceModel);
+
+ /// <summary>
+ /// Delete a profile picture from the cloud and the database
+ /// </summary>
+ /// <param name="id">The profile picture's Guid</param>
+ /// <returns>True if the picture is deleted, false otherwise</returns>
+ Task<bool> DeleteProfilePicture(Guid id);
+ }
+}