CSCfi / CSCfi/rems

Add attachment with one API call

Open
#1,581 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Technical Debt
Dominant language
Clojure
Stars
67
Forks
28
Avg merge
7d 4h
Merged PRs (30d)
2

Description

Currently, an attachment is added and then a draft-saved command is issued to store the reference to the attachment in the application

Instead, we should have an API endpoint like /application/add-attachment?application-id=123&field-id=7 that would add the attachment to the db and emit a draft-saved event. This would simplify the logic on the UI side.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Trace the current attachment-addition flow and the subsequent draft-saved command before choosing an entry point. Implement the proposed /application/add-attachment endpoint so it stores the attachment reference and emits a draft-saved event in one call; verify that the UI no longer needs the separate command and that existing behavior remains intact.

Written by the indexing model from the issue text.

Assessment

Tech stack
clojure
Domain
api, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.