create && get applications
This commit is contained in:
parent
c98e8e889d
commit
1a1562e277
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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": {
|
||||
|
|
|
|||
Loading…
Reference in New Issue