Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SMART
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UNI-KLU
SMART
Commits
71a67547
Commit
71a67547
authored
Jun 29, 2021
by
Manuel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[business-logic] fixed yaml file and syntax errors
parent
374480da
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
43 deletions
+34
-43
routes.yml
...on-hub/business-logic-microservice/app/configs/routes.yml
+28
-37
layer.py
...ation-hub/business-logic-microservice/app/routes/layer.py
+2
-2
tables.py
...tion-hub/business-logic-microservice/app/routes/tables.py
+3
-3
use_case.py
...on-hub/business-logic-microservice/app/routes/use_case.py
+1
-1
No files found.
src/participation-hub/business-logic-microservice/app/configs/routes.yml
View file @
71a67547
...
...
@@ -47,12 +47,11 @@ paths:
summary
:
"
Delete
all
Use-Cases"
description
:
"
Delete
all
Use-Cases"
parameters
:
-
name
:
"
confirmation"
desciption
:
"
'yes'
to
confirm
deletion"
in
:
"
query"
-
in
:
query
name
:
confirmation
type
:
string
required
:
true
schema
:
type
:
"
string"
description
:
"
'yes'
to
confirm
deletion"
responses
:
'
200'
:
description
:
"
Successful
Request"
...
...
@@ -82,12 +81,11 @@ paths:
summary
:
"
Delete
all
Tables"
description
:
"
Delete
all
Tables"
parameters
:
-
name
:
"
confirmation"
desciption
:
"
'yes'
to
confirm
deletion"
in
:
"
query"
-
in
:
query
name
:
confirmation
type
:
string
required
:
true
schema
:
type
:
"
string"
description
:
"
'yes'
to
confirm
deletion"
responses
:
'
200'
:
description
:
"
Successful
Request"
...
...
@@ -149,12 +147,11 @@ paths:
description
:
"
Name
of
the
Use-Case
the
Table
belongs
to"
required
:
true
type
:
"
string"
-
name
:
"
confirmation"
desciption
:
"
'yes'
to
confirm
deletion"
in
:
"
query"
-
in
:
query
name
:
confirmation
type
:
string
required
:
true
schema
:
type
:
"
string"
description
:
"
'yes'
to
confirm
deletion"
responses
:
'
200'
:
description
:
"
Successful
Request"
...
...
@@ -194,8 +191,6 @@ paths:
# END-TABLES
#####
#####
# LAYERS
#####
...
...
@@ -220,12 +215,11 @@ paths:
summary
:
"
Delete
all
Layers
from
the
DB"
description
:
"
Delete
all
Layers
from
the
DB"
parameters
:
-
name
:
"
confirmation"
desciption
:
"
'yes'
to
confirm
deletion"
in
:
"
query"
-
in
:
query
name
:
confirmation
type
:
string
required
:
true
schema
:
type
:
"
string"
description
:
"
'yes'
to
confirm
deletion"
responses
:
'
200'
:
description
:
"
Successful
Request"
...
...
@@ -351,12 +345,11 @@ paths:
type
:
string
example
:
"
end_time"
description
:
"
Internal
name
of
the
attribute"
-
name
:
"
confirmation"
desciption
:
"
'yes'
to
confirm
deletion"
in
:
"
query"
-
in
:
query
name
:
confirmation
type
:
string
required
:
true
schema
:
type
:
"
string"
description
:
"
'yes'
to
confirm
deletion"
responses
:
'
200'
:
description
:
"
Successful
Request"
...
...
@@ -440,12 +433,11 @@ paths:
description
:
"
Name
of
the
Layer"
required
:
true
type
:
"
string"
-
name
:
"
confirmation"
desciption
:
"
'yes'
to
confirm
deletion"
in
:
"
query"
-
in
:
query
name
:
confirmation
type
:
string
required
:
true
schema
:
type
:
"
string"
description
:
"
'yes'
to
confirm
deletion"
responses
:
'
200'
:
description
:
"
Successful
Request"
...
...
@@ -509,12 +501,11 @@ paths:
required
:
true
schema
:
$ref
:
'
#/definitions/LayerMapping'
-
name
:
"
confirmation"
desciption
:
"
'yes'
to
confirm
deletion"
in
:
"
query"
-
in
:
query
name
:
confirmation
type
:
string
required
:
true
schema
:
type
:
"
string"
description
:
"
'yes'
to
confirm
deletion"
responses
:
'
200'
:
description
:
"
Successful
Request"
...
...
src/participation-hub/business-logic-microservice/app/routes/layer.py
View file @
71a67547
...
...
@@ -23,7 +23,7 @@ def delete_all_layers(confirmation: str):
@params:
confirmation - Required : "yes" to confirm deletion
'''
if
confirmation
!=
"yes"
if
confirmation
!=
"yes"
:
return
Response
(
status
=
403
)
layer_repository
.
delete_all
()
...
...
@@ -223,7 +223,7 @@ def delete_one(use_case: str, table: str, name: str, confirmation: str):
name - Required : unique identifier for the Layer
confirmation- Required : "yes" to confirm deletion
'''
if
confirmation
!=
"yes"
if
confirmation
!=
"yes"
:
return
Response
(
status
=
403
)
layer
=
layer_repository
.
one
(
name
,
use_case
,
table
)
...
...
src/participation-hub/business-logic-microservice/app/routes/tables.py
View file @
71a67547
...
...
@@ -53,15 +53,15 @@ def add_complete(use_case: str):
def
delete_all_for_use_case
(
use_case
:
str
,
confirmation
:
str
):
if
confirmation
!=
"yes"
if
confirmation
!=
"yes"
:
return
Response
(
status
=
403
)
table_repository
.
delete_for_use_case
(
use_case
)
return
Response
(
status
=
200
)
def
delete_all
():
def
delete_all
(
confirmation
:
str
):
if
confirmation
!=
"yes"
if
confirmation
!=
"yes"
:
return
Response
(
status
=
403
)
table_repository
.
delete_all
()
...
...
src/participation-hub/business-logic-microservice/app/routes/use_case.py
View file @
71a67547
...
...
@@ -17,7 +17,7 @@ def all():
def
delete_all
(
confirmation
:
str
):
if
confirmation
!=
"yes"
if
confirmation
!=
"yes"
:
return
Response
(
status
=
403
)
use_case_repository
.
delete_all
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment