##// END OF EJS Templates
API: create_repo returns now repo object after creation
marcink -
r2378:04ef27ce beta
parent child Browse files
Show More
@@ -571,6 +571,15 b' OUTPUT::'
571 result: {
571 result: {
572 "id": "<newrepoid>",
572 "id": "<newrepoid>",
573 "msg": "Created new repository <reponame>",
573 "msg": "Created new repository <reponame>",
574 "repo": {
575 "id" : "<id>",
576 "repo_name" : "<reponame>"
577 "type" : "<type>",
578 "description" : "<description>",
579 "clone_uri" : "<clone_uri>",
580 "private": : "<bool>",
581 "created_on" : "<datetimecreated>",
582 },
574 }
583 }
575 error: null
584 error: null
576
585
@@ -521,14 +521,22 b' class ApiController(JSONRPCController):'
521 repo_type=repo_type,
521 repo_type=repo_type,
522 repo_group=group.group_id if group else None,
522 repo_group=group.group_id if group else None,
523 clone_uri=clone_uri
523 clone_uri=clone_uri
524 ),
524 )
525 owner
526 )
525 )
527 Session.commit()
526 Session.commit()
528
527
529 return dict(
528 return dict(
530 id=repo.repo_id,
529 id=repo.repo_id,
531 msg="Created new repository %s" % repo.repo_name
530 msg="Created new repository %s" % (repo.repo_name),
531 repo=dict(
532 id=repo.repo_id,
533 repo_name=repo.repo_name,
534 type=repo.repo_type,
535 clone_uri=repo.clone_uri,
536 private=repo.private,
537 created_on=repo.created_on,
538 description=repo.description,
539 )
532 )
540 )
533
541
534 except Exception:
542 except Exception:
General Comments 0
You need to be logged in to leave comments. Login now