multiple_domains
parent
987a8e2d58
commit
de35d211e0
|
@ -14,7 +14,7 @@ api.add_resource(activitypub.Inbox, "/inbox/<string:username>")
|
|||
api.add_resource(whitelist.Whitelist, "/whitelist")
|
||||
api.add_resource(whitelist.WhitelistDomain, "/whitelist/<string:domain>")
|
||||
api.add_resource(endorsements.Endorsements, "/endorsements/<string:domain>")
|
||||
api.add_resource(endorsements.Approvals, "/approvals/<string:domains>")
|
||||
api.add_resource(endorsements.Approvals, "/approvals/<string:domains_csv>")
|
||||
api.add_resource(guarantees.Guarantors, "/guarantors/<string:domain>")
|
||||
api.add_resource(guarantees.Guarantees, "/guarantees/<string:domain>")
|
||||
api.add_resource(badges.GuaranteeBadge, "/badges/guarantees/<string:domain>.svg")
|
||||
|
|
|
@ -11,12 +11,12 @@ class Approvals(Resource):
|
|||
@cache.cached(timeout=10, query_string=True)
|
||||
@api.marshal_with(models.response_model_model_Whitelist_get, code=200, description='Instances', skip_none=True)
|
||||
@api.response(404, 'Instance not registered', models.response_model_error)
|
||||
def get(self, domains):
|
||||
def get(self, domains_csv):
|
||||
'''Display all endorsements given out by one or more domains
|
||||
You can pass a comma-separated list of domain names and the results will be a set of all their
|
||||
endorsements together.
|
||||
'''
|
||||
domains_list = domains.split(',')
|
||||
domains_list = domains_csv.split(',')
|
||||
self.args = self.get_parser.parse_args()
|
||||
instances = database.find_multiple_instance_by_domains(domains_list)
|
||||
if not instances:
|
||||
|
|
Loading…
Reference in New Issue