Skip to content

Commit

Permalink
feat(rootfs/api): create new service.
Browse files Browse the repository at this point in the history
create new service if it doesn't exist
  • Loading branch information
notmaxx committed Sep 24, 2018
1 parent ffa5ca3 commit ae1fbd7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rootfs/api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,8 @@ def create_or_update(self, request, **kwargs):
else:
svc.path_pattern = pp
svc.save()
else:
svc = Service.create(owner=self.owner, app=self.app, procfile_type=pft, path_pattern=pp)
return Response(status=status.HTTP_201_CREATED)

def delete(self, request, **kwargs):
Expand Down

0 comments on commit ae1fbd7

Please sign in to comment.