diff options
| author | transtrike <transtrike@gmail.com> | 2021-04-02 23:53:11 +0300 |
|---|---|---|
| committer | transtrike <transtrike@gmail.com> | 2021-04-02 23:53:11 +0300 |
| commit | b0c6c6e1795a1cc8fe82a60ce16a263ab4cad397 (patch) | |
| tree | b82e15d10e28759dcd066b38ccdd16c23753b33c /src/Web | |
| parent | adff0d579e7e23fd78cce144b358f98737c91bcf (diff) | |
| download | DevHive-b0c6c6e1795a1cc8fe82a60ce16a263ab4cad397.tar DevHive-b0c6c6e1795a1cc8fe82a60ce16a263ab4cad397.tar.gz DevHive-b0c6c6e1795a1cc8fe82a60ce16a263ab4cad397.zip | |
ReadProfilePic endpoint implemented
Diffstat (limited to 'src/Web')
| -rw-r--r-- | src/Web/DevHive.Web/Controllers/ProfilePictureController.cs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/Web/DevHive.Web/Controllers/ProfilePictureController.cs b/src/Web/DevHive.Web/Controllers/ProfilePictureController.cs index 1c736f6..9a76e2c 100644 --- a/src/Web/DevHive.Web/Controllers/ProfilePictureController.cs +++ b/src/Web/DevHive.Web/Controllers/ProfilePictureController.cs @@ -29,6 +29,20 @@ namespace DevHive.Web.Controllers } /// <summary> + /// Get the URL of user's profile picture + /// </summary> + /// <param name="profilePictureId">The profile picture's Id</param> + /// <param name="authorization">JWT Bearer Token</param> + /// <returns>The URL of the profile picture</returns> + [HttpGet] + [AllowAnonymous] + public async Task<IActionResult> ReadProfilePicture(Guid profilePictureId, [FromHeader] string authorization) + { + string profilePicURL = await this._profilePictureService.GetProfilePictureById(profilePictureId); + return new OkObjectResult(new { ProfilePictureURL = profilePicURL} ); + } + + /// <summary> /// Alter the profile picture of a user /// </summary> /// <param name="userId">The user's Id</param> |
