Skip to content
This repository was archived by the owner on Sep 17, 2026. It is now read-only.
This repository was archived by the owner on Sep 17, 2026. It is now read-only.

Test PoI Submission API Implementation #22

Description

@fatiudeen

Description

This issue is created to test the functionality of the Proof of Impact (PoI) submission API implemented in a previous issue. The goal is to validate that users can successfully submit before-and-after cleanup photos, with proper file validation, metadata extraction, and database storage.

Tasks

Test PoI Submission Endpoint

  • Send a POST /api/poi/submit request with valid image files.
  • Ensure the API correctly handles multipart file uploads.

File Validation

  • Confirm only JPEG, JPG, HEIC formats are accepted.
  • Ensure images exceeding 10 MB are rejected.
  • Verify that exactly two images (before & after) are required per submission.

Metadata Extraction & Storage

  • Check that geotags (latitude, longitude) and timestamps are correctly extracted.
  • Confirm metadata is stored without being used for validation.
  • Verify that location data is saved for potential impact tracking.

Database Storage

  • Ensure the following details are correctly stored:
    • User ID (wallet address).
    • Before & After image IPFS/Filecoin CIDs.
    • Extracted metadata (timestamps, geotags).
    • Submission status: "pending" | "verified" | "rejected".

Response & Error Handling

  • Verify a success response with a submission ID if all conditions are met.
  • Confirm proper error messages are returned when:
    • File format is invalid.
    • Image size exceeds 10 MB.
    • Only one image is uploaded.

Expected Outcome

The API should properly validate and process PoI submissions, store relevant data, and handle errors gracefully.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

backendnon-rewardedonlydust-waveContribute to awesome OSS repos during OnlyDust's open source week

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions