Conversation
This is a Mac-only file that should not be the code repository.
WillieCubed
left a comment
There was a problem hiding this comment.
Overall, looks good to me as we'll have to talk about our final implementation for post uploads at the next meeting, but make the requested changes then I'll review them again.
.vscode/settings.json
Outdated
| @@ -0,0 +1,5 @@ | |||
| { | |||
There was a problem hiding this comment.
For future reference, don't check IDE preferences into Git. I'd actually recommend adding this to the .gitignore file, untracking this file, then committing.
| machine learning. | ||
| """ | ||
|
|
||
| def __init__(self, id: str, image_url: str, hashtags: list, caption: str): |
There was a problem hiding this comment.
Just FYI, we're going to have to rewrite a lot of the models with the new spec.
backend/posts/posts.py
Outdated
|
|
||
| db = firestore.client() | ||
|
|
||
| firebase = pyrebase.initialize_app(firebaseConfig) # Intialize Firebase with configuration settings |
There was a problem hiding this comment.
I didn't notice this the first time around, but we're going to have to use a different means (not pyrebase, which is unmaintained) to access Cloud Storage.
backend/posts/posts.py
Outdated
| COLLECTION_POSTS = u'/posts' | ||
|
|
||
|
|
||
| firebaseConfig = { |
There was a problem hiding this comment.
Because we're deploying this on Google Cloud Functions, Application Default Credentials will be the means by which we authenticate our access to Firebase APIs.
It's technically okay to check these into version control as they are meant for the web, which is inherently public, but we'll remove these later.
backend/main.py
Outdated
| if imageUrl is None or imageUrl == '' | ||
| add_post_metadata = AddPostMetadata() | ||
| # TODO: Handle uploads | ||
| # TODO: Upload photo from request to Cloud Storage |
There was a problem hiding this comment.
You can remove the completed to-dos here.
| else: | ||
| error_body = { | ||
| 'errorCode': 'methodNotSupported', | ||
| 'message': 'This HTTP method is support supported by this server.' |
There was a problem hiding this comment.
Thanks for fixing this. 😆
Finished basic upload function