diff --git a/website/web/api/v1/sighting.py b/website/web/api/v1/sighting.py index eb640fc..cdb5108 100644 --- a/website/web/api/v1/sighting.py +++ b/website/web/api/v1/sighting.py @@ -22,7 +22,7 @@ from website.validators import validate_json from website.web.api.v1.common import auth_func from website.web.api.v1.common import metada_params_model -from website.web.api.v1.common import user_light_params_model +from website.web.api.v1.common import user_params_model from website.web.api.v1.common import uuid_type from website.web.api.v1.types import ResultType from website.models import Sighting @@ -102,6 +102,10 @@ sighting = sighting_ns.model("Sighting", sighting_params_model) metadata = sighting_ns.model("metadata", metada_params_model) +sighting["author"] = fields.Nested( + sighting_ns.model("User", user_params_model), readonly=True +) + sighting_list_fields = sighting_ns.model( "SightingsList", { @@ -226,7 +230,8 @@ def post(self) -> Tuple[ResultType, int]: ) if ( - Sighting.query.filter( + sighting.get("source", False) + and Sighting.query.filter( Sighting.vulnerability.ilike(sighting["vulnerability"]), Sighting.source == sighting["source"], # func.date(Sighting.creation_timestamp) == func.date(current_time), diff --git a/website/web/templates/vuln.html b/website/web/templates/vuln.html index 0e33db3..10d3bec 100644 --- a/website/web/templates/vuln.html +++ b/website/web/templates/vuln.html @@ -10,6 +10,7 @@ + @@ -261,7 +262,24 @@
Tags
+
+

Sightings

+
+ + + + + + + + + + +
AuthorSourceTypeDate
+
+
+

Nomenclature