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
20a6aea9
Commit
20a6aea9
authored
Dec 21, 2020
by
Alexander Lercher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[BusinessLogic] Changed crowd-journ layer fields to match table fields
parent
cf545b17
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
10 deletions
+5
-10
add_video.py
...add_use_case_scripts/crowd_journalism/tables/add_video.py
+2
-8
requestPost.py
...gic-microservice/app/_add_use_case_scripts/requestPost.py
+3
-2
No files found.
src/participation-hub/business-logic-microservice/app/_add_use_case_scripts/crowd_journalism/tables/add_video.py
View file @
20a6aea9
from
_add_use_case_scripts.requestPost
import
postLayersToSwagger
,
postTableToSwagger
from
_add_use_case_scripts.requestPost
import
postLayersToSwagger
,
postTableToSwagger
def
add_table
(
use_case
:
str
,
table_name
:
str
):
def
add_table
(
use_case
:
str
,
table_name
:
str
):
'''
'''
take the columns and add the mappings at the server
take the columns and add the mappings at the server
...
@@ -70,7 +71,6 @@ def add_layers(use_case:str, table_name: str):
...
@@ -70,7 +71,6 @@ def add_layers(use_case:str, table_name: str):
"objecttype"
,
"objecttype"
,
"creationTimestamp"
,
"creationTimestamp"
,
"geolocation"
,
"geolocation"
,
"userid"
,
"videoid"
,
"videoid"
,
"price"
,
"price"
,
"informativeRating"
,
"informativeRating"
,
...
@@ -91,7 +91,6 @@ def add_layers(use_case:str, table_name: str):
...
@@ -91,7 +91,6 @@ def add_layers(use_case:str, table_name: str):
"objecttype"
,
"objecttype"
,
"creationTimestamp"
,
"creationTimestamp"
,
"geolocation"
,
"geolocation"
,
"userid"
,
"videoid"
,
"videoid"
,
"price"
,
"price"
,
"informativeRating"
,
"informativeRating"
,
...
@@ -112,7 +111,6 @@ def add_layers(use_case:str, table_name: str):
...
@@ -112,7 +111,6 @@ def add_layers(use_case:str, table_name: str):
"objecttype"
,
"objecttype"
,
"creationTimestamp"
,
"creationTimestamp"
,
"geolocation"
,
"geolocation"
,
"userid"
,
"videoid"
,
"videoid"
,
"price"
,
"price"
,
"informativeRating"
,
"informativeRating"
,
...
@@ -133,7 +131,6 @@ def add_layers(use_case:str, table_name: str):
...
@@ -133,7 +131,6 @@ def add_layers(use_case:str, table_name: str):
"objecttype"
,
"objecttype"
,
"creationTimestamp"
,
"creationTimestamp"
,
"geolocation"
,
"geolocation"
,
"userid"
,
"videoid"
,
"videoid"
,
"price"
,
"price"
,
"informativeRating"
,
"informativeRating"
,
...
@@ -154,7 +151,6 @@ def add_layers(use_case:str, table_name: str):
...
@@ -154,7 +151,6 @@ def add_layers(use_case:str, table_name: str):
"objecttype"
,
"objecttype"
,
"creationTimestamp"
,
"creationTimestamp"
,
"geolocation"
,
"geolocation"
,
"userid"
,
"videoid"
,
"videoid"
,
"price"
,
"price"
,
"informativeRating"
,
"informativeRating"
,
...
@@ -175,7 +171,6 @@ def add_layers(use_case:str, table_name: str):
...
@@ -175,7 +171,6 @@ def add_layers(use_case:str, table_name: str):
"objecttype"
,
"objecttype"
,
"creationTimestamp"
,
"creationTimestamp"
,
"geolocation"
,
"geolocation"
,
"userid"
,
"videoid"
,
"videoid"
,
"price"
,
"price"
,
"informativeRating"
,
"informativeRating"
,
...
@@ -196,7 +191,6 @@ def add_layers(use_case:str, table_name: str):
...
@@ -196,7 +191,6 @@ def add_layers(use_case:str, table_name: str):
"objecttype"
,
"objecttype"
,
"creationTimestamp"
,
"creationTimestamp"
,
"geolocation"
,
"geolocation"
,
"userid"
,
"videoid"
,
"videoid"
,
"price"
,
"price"
,
"informativeRating"
,
"informativeRating"
,
...
@@ -216,4 +210,4 @@ def main(use_case: str):
...
@@ -216,4 +210,4 @@ def main(use_case: str):
print
(
"video"
)
print
(
"video"
)
table_name
=
"video"
table_name
=
"video"
add_table
(
use_case
,
table_name
)
add_table
(
use_case
,
table_name
)
add_layers
(
use_case
,
table_name
)
add_layers
(
use_case
,
table_name
)
\ No newline at end of file
src/participation-hub/business-logic-microservice/app/_add_use_case_scripts/requestPost.py
View file @
20a6aea9
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
import
network_constants
as
nc
import
network_constants
as
nc
from
security.token_manager
import
TokenManager
from
security.token_manager
import
TokenManager
import
requests
import
requests
from
typing
import
List
def
postTableToSwagger
(
use_case
:
str
,
table
:
dict
):
def
postTableToSwagger
(
use_case
:
str
,
table
:
dict
):
...
@@ -20,7 +21,7 @@ def postTableToSwagger(use_case:str, table:dict ):
...
@@ -20,7 +21,7 @@ def postTableToSwagger(use_case:str, table:dict ):
print
(
url
+
": "
+
str
(
response
.
status_code
)
+
" MSG:"
+
str
(
response
.
content
))
print
(
url
+
": "
+
str
(
response
.
status_code
)
+
" MSG:"
+
str
(
response
.
content
))
def
postLayersToSwagger
(
use_case
:
str
,
layers
:
dict
):
def
postLayersToSwagger
(
use_case
:
str
,
layers
:
List
[
dict
]
):
jwt
=
TokenManager
.
getInstance
()
.
getToken
()
jwt
=
TokenManager
.
getInstance
()
.
getToken
()
...
@@ -35,4 +36,4 @@ def postLayersToSwagger(use_case:str, layers:dict):
...
@@ -35,4 +36,4 @@ def postLayersToSwagger(use_case:str, layers:dict):
json
=
layer
json
=
layer
)
)
print
(
url
+
": "
+
str
(
response
.
status_code
)
+
" MSG:"
+
str
(
response
.
content
))
print
(
url
+
": "
+
str
(
response
.
status_code
)
+
" MSG:"
+
str
(
response
.
content
))
\ No newline at end of file
\ No newline at end of file
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