code-corps / code-corps/code-corps-api

RFC: Merge project `approved` and `approval_requested` flags into a single field

Offen
#1,279 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
needs clarification needs estimate RFC
Vorherrschende Sprache
Elixir
Sterne
234
Forks
82
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

# Problem

Looking at these two fields, it really seems they serve a singular purpose.
```Elixir
# A project is created
`approved: false, approval_requested: false`
# User submits project for approval
`approved: false, approval_requested: true`
# Admin approves project
`approved: true, approval_requested :does_not_matter`
```

A single field, for example,

```Elixir
# 'created' -> 'pending_approval' -> 'approved'
field :onboarding_status, :string, null: false, default: 'created'
```

Might serve our purposes much better.

We could add an additional status of `rejected` later, with an additional field of `rejected_reason` or something.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.