Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

Task assignment #89

Open
wants to merge 14 commits into
base: develop
Choose a base branch
from
19 changes: 18 additions & 1 deletion backend/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def initialise_logger(app):
os.makedirs(log_dir)

file_handler = RotatingFileHandler(
log_dir + "/tasking-manager.log", "a", 2 * 1024 * 1024, 3
log_dir + "/taskingmanager.log", "a", 2 * 1024 * 1024, 3
hc00364289 marked this conversation as resolved.
Show resolved Hide resolved
)
file_handler.setLevel(log_level)
file_handler.setFormatter(
Expand Down Expand Up @@ -227,6 +227,8 @@ def add_api_endpoints(app):
# Users API endpoint
from backend.api.users.resources import (
UsersRestAPI,
UserAPI,
UserUpdateAPI,
hc00364289 marked this conversation as resolved.
Show resolved Hide resolved
UsersAllAPI,
UsersQueriesUsernameAPI,
UsersQueriesUsernameFilterAPI,
Expand All @@ -235,6 +237,15 @@ def add_api_endpoints(app):
UsersQueriesFavoritesAPI,
UsersQueriesInterestsAPI,
UsersRecommendedProjectsAPI,
UserOSMAPI,
UserMappedProjects,
UserSetRole,
UserSetLevel,
UserSetExpertMode,
UserAcceptLicense,
hc00364289 marked this conversation as resolved.
Show resolved Hide resolved
AssignTasksAPI,
UnassignTasksAPI,
UserAssignedTasks,
)
from backend.api.users.tasks import UsersTasksAPI
from backend.api.users.actions import (
Expand Down Expand Up @@ -677,6 +688,12 @@ def add_api_endpoints(app):
# Users REST endpoint
api.add_resource(UsersAllAPI, format_url("users/"))
api.add_resource(UsersRestAPI, format_url("users/<int:user_id>/"))
api.add_resource(AssignTasksAPI, format_url("project/<int:project_id>/assign"))
api.add_resource(UnassignTasksAPI, format_url("project/<int:project_id>/unassign"))
api.add_resource(
UserAssignedTasks, format_url("user/<string:username>/assigned-tasks")
)

api.add_resource(
UsersQueriesUsernameFilterAPI,
format_url("users/queries/filter/<string:username>/"),
Expand Down
Loading