Commit a0aa764c authored by Wei Shoulin's avatar Wei Shoulin
Browse files

fix(catalog): add validation for catalog_name parameter

parent efa4a979
......@@ -38,6 +38,8 @@ def search(ra: float,
try:
import pandas as pd
if not catalog_name:
return Result.error("catalog_name is required")
datas = request.post('/api/catalog', {
'ra': ra,
'dec': dec,
......@@ -93,6 +95,8 @@ def describe_catalog(catalog_name: str) -> Result:
"""
try:
import pandas as pd
if not catalog_name:
return Result.error("catalog_name is required")
datas = request.get(f'/api/catalog/describe/{catalog_name}')
if datas and isinstance(datas, Result):
return datas
......
Supports Markdown
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