PUT to Post

This commit is contained in:
preetparida1 2025-10-29 23:48:12 +05:30
parent 0c4992c592
commit a9d70b98ce
5 changed files with 9 additions and 9 deletions

View File

@ -107,7 +107,7 @@ namespace OnlineAssessment.V1.Controllers
/// This endpoint will update the examtype(SU). /// This endpoint will update the examtype(SU).
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
[HttpPut("{id}")] [HttpPost("{id}/Update")]
[Authorize(Roles = "SuperAdmin")] [Authorize(Roles = "SuperAdmin")]
public IActionResult UpdateExamType(int id, [FromBody] ExamTypeEditModel theExamType) public IActionResult UpdateExamType(int id, [FromBody] ExamTypeEditModel theExamType)
{ {
@ -134,7 +134,7 @@ namespace OnlineAssessment.V1.Controllers
/// This endpoint will restore the deleted examtypes(SU). /// This endpoint will restore the deleted examtypes(SU).
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
[HttpPut("{id}/Restore")] [HttpPost("{id}/Restore")]
[Authorize(Roles = "SuperAdmin")] [Authorize(Roles = "SuperAdmin")]
public IActionResult RestoreExamType(int id) public IActionResult RestoreExamType(int id)
{ {

View File

@ -104,7 +104,7 @@ namespace OnlineAssessment.V1.Controllers
} }
[HttpPut("{id}")] [HttpPost("{id}/Update")]
[Authorize(Roles = "SuperAdmin")] [Authorize(Roles = "SuperAdmin")]
public IActionResult UpdateInstitute(int id, [FromBody] InstituteEditModel theInstitute) public IActionResult UpdateInstitute(int id, [FromBody] InstituteEditModel theInstitute)
{ {

View File

@ -134,7 +134,7 @@ namespace OnlineAssessment.V1.Controllers
/// This endpoint will update the language(SU). /// This endpoint will update the language(SU).
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
[HttpPut("{id}")] [HttpPost("{id}/Update")]
[Authorize(Roles = "SuperAdmin")] [Authorize(Roles = "SuperAdmin")]
public IActionResult UpdateLanguage(int id, [FromBody] LanguageEditModel theLanguage) public IActionResult UpdateLanguage(int id, [FromBody] LanguageEditModel theLanguage)
{ {
@ -161,7 +161,7 @@ namespace OnlineAssessment.V1.Controllers
/// This endpoint will restore the deleted languages(SU). /// This endpoint will restore the deleted languages(SU).
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
[HttpPut("{id}/Restore")] [HttpPost("{id}/Restore")]
[Authorize(Roles = "SuperAdmin")] [Authorize(Roles = "SuperAdmin")]
public IActionResult RestoreLanguage(int id) public IActionResult RestoreLanguage(int id)
{ {

View File

@ -106,7 +106,7 @@ namespace OnlineAssessment.V1.Controllers
/// This endpoint will update the language(SU). /// This endpoint will update the language(SU).
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
[HttpPut("{id}")] [HttpPost("{id}/Update")]
[Authorize(Roles = "SuperAdmin")] [Authorize(Roles = "SuperAdmin")]
public IActionResult UpdateQuestionType(int id, [FromBody] QuestionTypeEditModel theQnsType) public IActionResult UpdateQuestionType(int id, [FromBody] QuestionTypeEditModel theQnsType)
{ {
@ -133,7 +133,7 @@ namespace OnlineAssessment.V1.Controllers
/// This endpoint will restore the deleted questiontypes(SU). /// This endpoint will restore the deleted questiontypes(SU).
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
[HttpPut("{id}/Restore")] [HttpPost("{id}/Restore")]
[Authorize(Roles = "SuperAdmin")] [Authorize(Roles = "SuperAdmin")]
public IActionResult RestoreQuestionType(int id) public IActionResult RestoreQuestionType(int id)
{ {

View File

@ -110,7 +110,7 @@ namespace OnlineAssessment.V1.Controllers
/// This endpoint will update the role(SU). /// This endpoint will update the role(SU).
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
[HttpPut("{id}")] [HttpPost("{id}/Update")]
[Authorize(Roles = "SuperAdmin")] [Authorize(Roles = "SuperAdmin")]
public IActionResult UpdateRole(int id, [FromBody] RoleEditModel theRole) public IActionResult UpdateRole(int id, [FromBody] RoleEditModel theRole)
{ {
@ -137,7 +137,7 @@ namespace OnlineAssessment.V1.Controllers
/// This endpoint will restore the deleted role(SU). /// This endpoint will restore the deleted role(SU).
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
[HttpPut("{id}/Restore")] [HttpPost("{id}/Restore")]
[Authorize(Roles = "SuperAdmin")] [Authorize(Roles = "SuperAdmin")]
public IActionResult RestoreRole(int id) public IActionResult RestoreRole(int id)
{ {