hngprojects / hng_boilerplate_python_fastapi_web

Apache License 2.0
153 stars 136 forks source link

Implement and Fix Activity Log Endpoints-New #261

Open NjengaC opened 3 months ago

NjengaC commented 3 months ago

Description

Develop and fix endpoints for handling activity logs. This includes creating new activity logs, retrieving all activity logs, and retrieving activity logs for a specific user.

Purpose

Implement endpoints to facilitate the creation and retrieval of activity logs for users.

Requirements

Acceptance Criteria

POST /activity-log

{ "status": "success", "message": "Activity log created successfully.", "status_code": 201 }

Successful Retrieval Response

{ "status": "success", "message": "Activity logs retrieved successfully.", "status_code": 200, "data": [] }

Invalid Input or Unauthorized Response

{ "status": "error", "message": "Invalid input or authentication issues.", "status_code": 400 }

User Not Found Response

{ "status": "error", "message": "User not found.", "status_code": 404 }

Checklist

Input Validation

NjengaC commented 3 months ago

GET /activity-log assigned to @0FFSIDE1 GET /activity-log/{user-id} assigned to @Kihuni POST /activity-log assigned to @NjengaC