Actually use the model

This commit is contained in:
mike cullerton 2022-02-02 12:35:08 -05:00
parent 55697c6c88
commit 35e2a53b09

View File

@ -1,4 +1,4 @@
from crc.models.git_models import GitRepoSchema
from crc.models.git_models import GitRepo, GitRepoSchema
from crc.services.git_service import GitService
@ -8,17 +8,20 @@ def get_repo():
def pull_from_remote():
repo_model = GitService().pull_from_remote()
repo = GitService().pull_from_remote()
repo_model = GitRepo.from_repo(repo)
return GitRepoSchema().dump(repo_model)
def push_to_remote(comment=None):
repo_model = GitService().push_to_remote(comment)
repo = GitService().push_to_remote(comment)
repo_model = GitRepo.from_repo(repo)
return GitRepoSchema().dump(repo_model)
def merge_with_branch(branch):
repo_model = GitService().merge_with_branch(branch)
repo = GitService().merge_with_branch(branch)
repo_model = GitRepo.from_repo(repo)
return GitRepoSchema().dump(repo_model)