Skip to content

Commit

Permalink
final commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisYx511 committed Jan 13, 2024
1 parent c978965 commit 44deb32
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion api/gmail/token.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"token": "ya29.a0AfB_byD5fGsvtvgGqI8utDmKcIC9or7xvndaJf9owws9l6TuG0C1EqG4r12OpHImBgiAj2MxWkG5r6x8RIWUzZ5AZUbIeMBhyQkfP_tE8fyg_OhlbFmSnG4uDunAn30X6e-RNMGdcNVW6eJKRKxK_c2Qj3frfMvJEtgJaCgYKAZkSARMSFQHGX2MieI76xBiiowjf6zUTZ2lgzg0171", "refresh_token": "1//05MVh9l0KSdq_CgYIARAAGAUSNwF-L9IrB-R_XAMM-m5hQwiCtVyyRbLVfQReMWoQh8wEQohm--j4HNf2VmKEV2-QtpYWuUFDuxE", "token_uri": "https://oauth2.googleapis.com/token", "client_id": "124807568946-u7be2rg379v1h22u527cb90h4rcdqt2e.apps.googleusercontent.com", "client_secret": "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", "scopes": ["https://mail.google.com/"], "universe_domain": "googleapis.com", "expiry": "2024-01-13T18:55:08.653696Z"}
{"token": "ya29.a0AfB_byCHEq94ILIOHgtzHKZZN4_0OJ-CvyeVwOZN0M-0LOuht-3HJv4SzMXOFfbAMICw5K40d7XjzgOBUeOJQJeFou2tUc-60j-vQ9aGMrkl-zDDdwa5yJDH9TkgjN4nWcrG6m5NzZqPjfSyMR1lNQyVCmxS2iw80d50aCgYKAfESARMSFQHGX2Mi1sQlEwsKkER14uOtKJD4aw0171", "refresh_token": "1//05MVh9l0KSdq_CgYIARAAGAUSNwF-L9IrB-R_XAMM-m5hQwiCtVyyRbLVfQReMWoQh8wEQohm--j4HNf2VmKEV2-QtpYWuUFDuxE", "token_uri": "https://oauth2.googleapis.com/token", "client_id": "124807568946-u7be2rg379v1h22u527cb90h4rcdqt2e.apps.googleusercontent.com", "client_secret": "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", "scopes": ["https://mail.google.com/"], "universe_domain": "googleapis.com", "expiry": "2024-01-13T20:14:28.976731Z"}
8 changes: 5 additions & 3 deletions api/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@ def refresh_emails():
message_contents = read_message(googleapi_client, recent_message)
if message_contents["read"]:
continue

gpt_feedback = get_feedback(openai_client, message_contents["text"])
gpt_feedback = {"positive": "NR"}
if len(message_contents["text"]) != 0:
gpt_feedback = get_feedback(openai_client, message_contents["text"])

modify_post_data = {
"removeLabelIds": [
Expand All @@ -66,7 +67,8 @@ def refresh_emails():
"desc": gpt_feedback["analysis"]
}

update_mail(database, update_query, new_values)
if len(message_contents["text"]) != 0:
update_mail(database, update_query, new_values)


@app.route("/send", methods=["POST"])
Expand Down
2 changes: 1 addition & 1 deletion frontend/brebeufhx-spinich-pizza/app/dashboard/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default function Dashboard() {
console.log(res2.data)
let recipient = res2.data
recipient.email = res.data.recipients[i]
setArrOfRecipients([...arrOfRecipients, recipient])
setArrOfRecipients((arrOfRecipients: any) => [...arrOfRecipients, recipient])

}
)
Expand Down
2 changes: 1 addition & 1 deletion frontend/brebeufhx-spinich-pizza/app/send/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export default function Send() {
<div className="my-2">
<button className="bg-yellow-400 p-4 hover:bg-yellow-200"
onClick={() => {setArrOfPlaceholders([...arrOfPlaceholders, '']); console.log(arrOfPlaceholders)}}
>Add Recipient</button>
>Add Placeholder</button>
</div>

</div>
Expand Down

0 comments on commit 44deb32

Please sign in to comment.