def update_metadata_post()

in core/views.py [0:0]


def update_metadata_post(username, caption, current_time_str): 
    hash_userid = hash_function(username)
    blob = bucket.get_blob(hash_userid + "/posts/" + current_time_str)

    metadata = {"post_id": hash_function(current_time_str), "time_posted": current_time_str, "caption": caption}

    blob.metadata = metadata
    blob.patch()

    print("Post metadata updated")