savvato-software / tribe-app-backend

3 stars 20 forks source link

Develop a plan to complete the attributes functionality #288

Open mrsbluerose opened 1 month ago

mrsbluerose commented 1 month ago

The attributes functionality isn't complete yet. For instance, in ReviewDecisionService::saveReviewDecision(), we save the decision of the phrase reviewer (Accepted, Nonsense, Vulgar), but we don't do anything with it. We should be updating the tables that associate the phrase with the user if it is valid, and add it to the rejected_* tables if not.

Ensure the entire Create Attribute process works:

Review the work to be done and create issues. Consult in meetings for help breaking the work down.

mrsbluerose commented 1 month ago

Notes from meeting 9/26:

Current AttributesAPIController logic flow:

POST: applyPhraseToUser
    if phraseService.isPhraseValid (checks if missing verb/noun, 
    any word previously rejected, phrase previously rejected)
        yes: 
        if phraseService.applyPhraseToUser
            yes: 
            if isPreviouslyReviewed (and approved)
            (checks if phrase has already been approved)
                yes: 
                add to user, return true
                no: 
                add user and phrase to toBeReviewed
****                default return false
            no: 
            send notification, returns false
        no: 
        sends notification, returns false

Current ToBeReviewed checker service:

Current ToBeReviewd logic: