jordanopensource / nuha-web

Web client for NUHA

Home Page:https://nuha.josa.ngo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Handle UI integration with the upload file or comment API

mbaraa opened this issue · comments

As a user I need to properly upload a file, or comment to Nuha, without having to use the API directly.

Since the dashboard already have placeholders for file and comment upload, all that's left is to integrate that part with the API that sends the data to Nuha.

Technical requirements:

  • The UI needs to send a file to the upload-file endpoint as a multipart-form.
  • The UI needs to send a comment to the upload-comment endpoint as a json following the format
{
  "comment": "some comment here",
  "post": "the original post text"
}
  • The UI needs to show the user any occurring error as a toast alert.

Issue Checklist:

  • Upload file handler.
  • Upload comment handler.
  • Response status toast.

Duplicate of #17 and #18