Open fisher60 opened 1 month ago
from flask import Flask, request, jsonify
app = Flask(name)
Example data storage(Dummy Data) developer_applications = { 1: {'name': 'App One'}, 2: {'name': 'App Two'} }
@app.route('/developer_application/
if name == 'main': app.run(debug=True)
reference: here
Thank you, this was overwhelmingly unhelpful and my day was made worse because of it.
I am sorry for making your day worst but from my knowledge I already use in my project and it work And I am only suggesting you .And It upto you how to use it .
On Mon, 24 Jun, 2024, 9:15 pm Kyler, @.***> wrote:
Thank you, this was overwhelmingly unhelpful and my day was made worse because of it.
— Reply to this email directly, view it on GitHub https://github.com/AbandonTech/abandonauth/issues/142#issuecomment-2186881378, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWMNY7OKMQHWOV7RLQHUAQTZJA5LFAVCNFSM6AAAAABJUYF4GGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBWHA4DCMZXHA . You are receiving this because you commented.Message ID: @.***>
Hello, I originally assumed your comment was created by a bot/AI. My comment was mostly a joke as your comment was very irrelevant to this repo and this issue, so I did not suspect a real human was on the other end.
This project uses FastAPI, we do not use Flask, so your suggestion is not helpful. Furthermore, your suggestion appears to be closer to pseudo-code or perhaps an example to what an endpoint could look like in Flask.
We do not store our persistent data in a dictionary, so this suggestion is not relevant developer_applications[app_id]['name'] = data['name']
. Instead, we write persistent data to a database, and it would be bad practice to maintain a dictionary like this. Your return message is also misleading/incorrect as nothing would be updated since the change would be discarded on application restart (since the dictionary is only stored in memory, the persistent developer_application
would not be updated).
You also have multiple else
statements on your if
condition for error handling. This syntax is not correct, nor would the logic make sense as there is not check for the 404
response.
I do genuinely appreciate your contribution and attempt to help, though this comment was misguided and not actionable. If you would like to contribute to open-source, I would highly recommend simply creating a pull request with your proposed changes, we always appreciate that! Though, ensure that you are using the correct language and frameworks and following the repo guidelines.
Summary
Developer application names should be editable, we should add a way to modify a developer application name. This could possibly be done with a generic
patch
endpoint for/developer_application
. This endpoint will only be able to modify the name, in the future we may want to add additional fields that can be edited here.