using System;
using System.Threading.Tasks;
using DevHive.Web.Models.User;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
namespace DevHive.Web.Controllers
{
///
/// All endpoints for interacting with the profile picture layer
///
[ApiController]
[Route("api/[controller]")]
public class ProfilePictureController
{
// private readonly ProfilePictureService _profilePictureService;
// public ProfilePictureController(ProfilePictureService profilePictureService)
// {
// this._profilePictureService = profilePictureService;
// }
///
/// Alter the profile picture of a user
///
/// The user's Id
/// The new profile picture
/// JWT Bearer Token
/// ???
[HttpPut]
[Route("ProfilePicture")]
[Authorize(Roles = "User,Admin")]
public async Task UpdateProfilePicture(Guid userId, [FromForm] UpdateProfilePictureWebModel updateProfilePictureWebModel, [FromHeader] string authorization)
{
throw new NotImplementedException();
// if (!await this._userService.ValidJWT(userId, authorization))
// return new UnauthorizedResult();
// UpdateProfilePictureServiceModel updateProfilePictureServiceModel = this._userMapper.Map(updateProfilePictureWebModel);
// updateProfilePictureServiceModel.UserId = userId;
// ProfilePictureServiceModel profilePictureServiceModel = await this._userService.UpdateProfilePicture(updateProfilePictureServiceModel);
// ProfilePictureWebModel profilePictureWebModel = this._userMapper.Map(profilePictureServiceModel);
// return new AcceptedResult("UpdateProfilePicture", profilePictureWebModel);
}
}
}