Commit 20a6aea9 authored by Alexander Lercher's avatar Alexander Lercher

[BusinessLogic] Changed crowd-journ layer fields to match table fields

parent cf545b17
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
...@@ -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
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