Commit 71a67547 authored by Manuel's avatar Manuel

[business-logic] fixed yaml file and syntax errors

parent 374480da
...@@ -47,12 +47,11 @@ paths: ...@@ -47,12 +47,11 @@ paths:
summary: "Delete all Use-Cases" summary: "Delete all Use-Cases"
description: "Delete all Use-Cases" description: "Delete all Use-Cases"
parameters: parameters:
- name: "confirmation" - in: query
desciption: "'yes' to confirm deletion" name: confirmation
in: "query" type: string
required: true required: true
schema: description: "'yes' to confirm deletion"
type: "string"
responses: responses:
'200': '200':
description: "Successful Request" description: "Successful Request"
...@@ -82,12 +81,11 @@ paths: ...@@ -82,12 +81,11 @@ paths:
summary: "Delete all Tables" summary: "Delete all Tables"
description: "Delete all Tables" description: "Delete all Tables"
parameters: parameters:
- name: "confirmation" - in: query
desciption: "'yes' to confirm deletion" name: confirmation
in: "query" type: string
required: true required: true
schema: description: "'yes' to confirm deletion"
type: "string"
responses: responses:
'200': '200':
description: "Successful Request" description: "Successful Request"
...@@ -149,12 +147,11 @@ paths: ...@@ -149,12 +147,11 @@ paths:
description: "Name of the Use-Case the Table belongs to" description: "Name of the Use-Case the Table belongs to"
required: true required: true
type: "string" type: "string"
- name: "confirmation" - in: query
desciption: "'yes' to confirm deletion" name: confirmation
in: "query" type: string
required: true required: true
schema: description: "'yes' to confirm deletion"
type: "string"
responses: responses:
'200': '200':
description: "Successful Request" description: "Successful Request"
...@@ -194,8 +191,6 @@ paths: ...@@ -194,8 +191,6 @@ paths:
# END-TABLES # END-TABLES
##### #####
##### #####
# LAYERS # LAYERS
##### #####
...@@ -220,12 +215,11 @@ paths: ...@@ -220,12 +215,11 @@ paths:
summary: "Delete all Layers from the DB" summary: "Delete all Layers from the DB"
description: "Delete all Layers from the DB" description: "Delete all Layers from the DB"
parameters: parameters:
- name: "confirmation" - in: query
desciption: "'yes' to confirm deletion" name: confirmation
in: "query" type: string
required: true required: true
schema: description: "'yes' to confirm deletion"
type: "string"
responses: responses:
'200': '200':
description: "Successful Request" description: "Successful Request"
...@@ -351,12 +345,11 @@ paths: ...@@ -351,12 +345,11 @@ paths:
type: string type: string
example: "end_time" example: "end_time"
description: "Internal name of the attribute" description: "Internal name of the attribute"
- name: "confirmation" - in: query
desciption: "'yes' to confirm deletion" name: confirmation
in: "query" type: string
required: true required: true
schema: description: "'yes' to confirm deletion"
type: "string"
responses: responses:
'200': '200':
description: "Successful Request" description: "Successful Request"
...@@ -440,12 +433,11 @@ paths: ...@@ -440,12 +433,11 @@ paths:
description: "Name of the Layer" description: "Name of the Layer"
required: true required: true
type: "string" type: "string"
- name: "confirmation" - in: query
desciption: "'yes' to confirm deletion" name: confirmation
in: "query" type: string
required: true required: true
schema: description: "'yes' to confirm deletion"
type: "string"
responses: responses:
'200': '200':
description: "Successful Request" description: "Successful Request"
...@@ -509,12 +501,11 @@ paths: ...@@ -509,12 +501,11 @@ paths:
required: true required: true
schema: schema:
$ref: '#/definitions/LayerMapping' $ref: '#/definitions/LayerMapping'
- name: "confirmation" - in: query
desciption: "'yes' to confirm deletion" name: confirmation
in: "query" type: string
required: true required: true
schema: description: "'yes' to confirm deletion"
type: "string"
responses: responses:
'200': '200':
description: "Successful Request" description: "Successful Request"
......
...@@ -23,7 +23,7 @@ def delete_all_layers(confirmation: str): ...@@ -23,7 +23,7 @@ def delete_all_layers(confirmation: str):
@params: @params:
confirmation - Required : "yes" to confirm deletion confirmation - Required : "yes" to confirm deletion
''' '''
if confirmation != "yes" if confirmation != "yes":
return Response(status=403) return Response(status=403)
layer_repository.delete_all() layer_repository.delete_all()
...@@ -223,7 +223,7 @@ def delete_one(use_case: str, table: str, name: str, confirmation: str): ...@@ -223,7 +223,7 @@ def delete_one(use_case: str, table: str, name: str, confirmation: str):
name - Required : unique identifier for the Layer name - Required : unique identifier for the Layer
confirmation- Required : "yes" to confirm deletion confirmation- Required : "yes" to confirm deletion
''' '''
if confirmation != "yes" if confirmation != "yes":
return Response(status=403) return Response(status=403)
layer = layer_repository.one(name, use_case, table) layer = layer_repository.one(name, use_case, table)
......
...@@ -53,15 +53,15 @@ def add_complete(use_case: str): ...@@ -53,15 +53,15 @@ def add_complete(use_case: str):
def delete_all_for_use_case(use_case: str, confirmation: str): def delete_all_for_use_case(use_case: str, confirmation: str):
if confirmation != "yes" if confirmation != "yes":
return Response(status=403) return Response(status=403)
table_repository.delete_for_use_case(use_case) table_repository.delete_for_use_case(use_case)
return Response(status=200) return Response(status=200)
def delete_all(): def delete_all(confirmation: str):
if confirmation != "yes" if confirmation != "yes":
return Response(status=403) return Response(status=403)
table_repository.delete_all() table_repository.delete_all()
......
...@@ -17,7 +17,7 @@ def all(): ...@@ -17,7 +17,7 @@ def all():
def delete_all(confirmation: str): def delete_all(confirmation: str):
if confirmation != "yes" if confirmation != "yes":
return Response(status=403) return Response(status=403)
use_case_repository.delete_all() use_case_repository.delete_all()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment