diff --git a/VERAG_REST_SERVER/Controllers/SDLControler/SDLController.vb b/VERAG_REST_SERVER/Controllers/SDLControler/AuditFlowController.vb similarity index 69% rename from VERAG_REST_SERVER/Controllers/SDLControler/SDLController.vb rename to VERAG_REST_SERVER/Controllers/SDLControler/AuditFlowController.vb index 2998348..f556d97 100644 --- a/VERAG_REST_SERVER/Controllers/SDLControler/SDLController.vb +++ b/VERAG_REST_SERVER/Controllers/SDLControler/AuditFlowController.vb @@ -13,22 +13,22 @@ Imports VERAG_PROG_ALLGEMEIN.TESTJSON Namespace ApiController.Controllers - Public Class SDLController + Public Class AuditFlowController Inherits System.Web.Http.ApiController ''' - ''' Upload Files in Base64-Format and attach it to an existring LKW (with avisoId) or an specific consignment (with sendungsId) + ''' Upload Attachment in Base64-Format and attach it to an existring LKW (with avisoId) or an specific consignment (with sendungsId) ''' - ''' - ''' OK, if file is uploaded or ERROR-Code if something went wrong - ''' Returns 200 file is uploaded sucessfully - ''' Returns 400 upload failed + + + ''' Returns 200 if sucessfully + ''' Returns 400 update/upload failed - + - Public Async Function SetzePruefungAufErledigtMitAnhaengen(pruefungsId As Integer, Bemerkung As String, anhaengeBase64 As List(Of String)) As Task(Of HttpResponseMessage) + Public Async Function SetzePruefungAufErledigtMitAnhaengen(pruefungsId As Integer, Bemerkung As String, Optional anhaengeBase64 As List(Of String) = Nothing) As Task(Of HttpResponseMessage) ' Globale Fehlerbehandlung einstellen VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM = False VERAG_PROG_ALLGEMEIN.cAllgemein.ERR_OP_GLOBAL = VERAG_PROG_ALLGEMEIN.ERROR_OP.LOG @@ -41,16 +41,11 @@ Namespace ApiController.Controllers Return Request.CreateErrorResponse(HttpStatusCode.BadRequest, "Der Parameter 'Bemerkung' darf nicht leer sein.") End If - If anhaengeBase64 Is Nothing OrElse anhaengeBase64.Count = 0 Then - Return Request.CreateErrorResponse(HttpStatusCode.BadRequest, "Das 'anhaengeBase64' darf nicht leer sein.") - End If - If pruefungsId <= 0 Then Return Request.CreateErrorResponse(HttpStatusCode.BadRequest, "PrüfungsID muss gesetzt werden") End If - If VERAG_PROG_ALLGEMEIN.cAuditFlow.SetzePruefungAufErledigtMitAnhaengen(pruefungsId, Bemerkung, anhaengeBase64) Then Return Request.CreateResponse(HttpStatusCode.OK) diff --git a/VERAG_REST_SERVER/VERAG_REST_SERVER.vbproj b/VERAG_REST_SERVER/VERAG_REST_SERVER.vbproj index 00c0d0e..51235da 100644 --- a/VERAG_REST_SERVER/VERAG_REST_SERVER.vbproj +++ b/VERAG_REST_SERVER/VERAG_REST_SERVER.vbproj @@ -383,7 +383,7 @@ - +