GodotNuts / GodotFirebase

Implementations of Firebase for Godot using GDScript
MIT License
558 stars 79 forks source link

[BUG][Documentation] Wiki for Firestore Delete document is outdated #411

Closed thiscris closed 4 months ago

thiscris commented 4 months ago

Describe the bug The snippet in the wiki under Firestore - Delete a document var was_deleted = await firestore_collection.delete("DOCUMENT_ID") produces this validation error

Invalid argument for "delete()" function: argument 1 should be "FirestoreDocument" but is "String"

To Reproduce

func delete_document(collection:FirestoreCollection,document_name:String)->void:
    print("attempt deletion on %s" % collection)
    var was_deleted = await collection.delete(document_name)

Expected behavior If the documentation is only 1 line of code, it should be a working one :)

Environment:

Additional context There is one more snippet in that wiki section await collection.delete(document) -> bool # Returns true if deleted successfully it is probably the correct one, but would be better if it has the extra line where document is defined and the other code snippet is deleted

WolfgangSenff commented 4 months ago

Ahh, yeah, I was lazy purely due to having had just rewritten that entire piece of Firebase. I'll update it presently and then close this.

WolfgangSenff commented 4 months ago

Okay, I've updated the entire wiki for Firestore again with even the changes for 3.x, which had been fully implemented and merged but not updated in the wiki. I also got the delete one. For future reference, if you want to submit a fix, you can technically (I think!) open a PR against the wiki.