diff --git a/app/Http/Controllers/API/ApplicationController.php b/app/Http/Controllers/API/ApplicationController.php index 238b4bac..230590ea 100644 --- a/app/Http/Controllers/API/ApplicationController.php +++ b/app/Http/Controllers/API/ApplicationController.php @@ -15,7 +15,7 @@ class ApplicationController extends Controller public function create(){ $account = Auth::user()->account; - + //todo validate if new application can be created;(eger app yada legNo yok bolsa. Leg srok dolan bolsa doredip bilya) if($account->aplication){ $account->aplication->delete(); //todo on delete cascade delete documents and files diff --git a/storage/api-docs/api-docs.json b/storage/api-docs/api-docs.json index 7025284f..3b7e1109 100755 --- a/storage/api-docs/api-docs.json +++ b/storage/api-docs/api-docs.json @@ -408,7 +408,7 @@ "registration_date": {"type": "string"}, "state_registration_agency": {"type": "string"}, "registration_place": {"type": "string"}, - "registration_address": {"type": "string"}, + "registration_address": {"type": "string"} }, "type": "object", @@ -1419,6 +1419,202 @@ } ] } + }, + "/api/application": { + "get": { + "tags": ["Application"], + "summary": "Get accounts Legalization application", + "parameters": [{ + "name": "X-Localization", + "in": "header", + "description": "Localization", + "required": false, + "schema": { + "type": "string" + }, + "examples": { + "ru": { + "summary": "Russian localization", + "value": "ru" + }, + "en": { + "summary": "English localization", + "value": "en" + }, + "tm": { + "summary": "Turkmen localization", + "value": "tm" + } + } + }], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security":[ + { + "bearerAuth": [] + } + ] + } + }, + "/api/application/new": { + "get": { + "tags": ["Application"], + "summary": "Create,make new Legalization application", + "parameters": [{ + "name": "X-Localization", + "in": "header", + "description": "Localization", + "required": false, + "schema": { + "type": "string" + }, + "examples": { + "ru": { + "summary": "Russian localization", + "value": "ru" + }, + "en": { + "summary": "English localization", + "value": "en" + }, + "tm": { + "summary": "Turkmen localization", + "value": "tm" + } + } + }], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security":[ + { + "bearerAuth": [] + } + ] + } + }, + "/api/application/upload": { + "put": { + "tags": ["Application"], + "summary": "Upload document to application", + "parameters": [{ + "name": "X-Localization", + "in": "header", + "description": "Localization", + "required": false, + "schema": { + "type": "string" + }, + "examples": { + "ru": { + "summary": "Russian localization", + "value": "ru" + }, + "en": { + "summary": "English localization", + "value": "en" + }, + "tm": { + "summary": "Turkmen localization", + "value": "tm" + } + } + }], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security":[ + { + "bearerAuth": [] + } + ] + } + }, + "/api/application/apply": { + "put": { + "tags": ["Application"], + "summary": "Commit,apply application. send to review ", + "parameters": [{ + "name": "X-Localization", + "in": "header", + "description": "Localization", + "required": false, + "schema": { + "type": "string" + }, + "examples": { + "ru": { + "summary": "Russian localization", + "value": "ru" + }, + "en": { + "summary": "English localization", + "value": "en" + }, + "tm": { + "summary": "Turkmen localization", + "value": "tm" + } + } + }], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security":[ + { + "bearerAuth": [] + } + ] + } } }, "components": {