mirror of
https://github.com/haiwen/seahub.git
synced 2025-08-10 19:32:25 +00:00
add monitored field when get repo info
This commit is contained in:
parent
7d794157e9
commit
268ebfae9a
@ -395,6 +395,12 @@ class RepoView(APIView):
|
||||
has_been_shared_out = False
|
||||
logger.error(e)
|
||||
|
||||
monitored = False
|
||||
monitored_repos = UserMonitoredRepos.objects.filter(email=username,
|
||||
repo_id=repo_id)
|
||||
if monitored_repos:
|
||||
monitored = True
|
||||
|
||||
result = {
|
||||
"repo_id": repo.id,
|
||||
"repo_name": repo.name,
|
||||
@ -416,7 +422,8 @@ class RepoView(APIView):
|
||||
"lib_need_decrypt": lib_need_decrypt,
|
||||
"last_modified": timestamp_to_isoformat_timestr(repo.last_modify),
|
||||
"status": normalize_repo_status_code(repo.status),
|
||||
"enable_onlyoffice": enable_onlyoffice
|
||||
"enable_onlyoffice": enable_onlyoffice,
|
||||
"monitored": monitored,
|
||||
}
|
||||
|
||||
return Response(result)
|
||||
@ -542,6 +549,7 @@ class RepoShareInfoView(APIView):
|
||||
|
||||
return Response(result)
|
||||
|
||||
|
||||
class RepoImageRotateView(APIView):
|
||||
authentication_classes = (TokenAuthentication, SessionAuthentication)
|
||||
permission_classes = (IsAuthenticated, )
|
||||
|
Loading…
Reference in New Issue
Block a user