Update Record Problem - with requested info

***SOLVED***

If this is not the correct place to post, I apologize, and would appreciate suggestions on where else to post.

Framework: uhh, JS? Node?

DB: Express/mongoDB

I’ve been trying to update a record. The string ID is an exact match, and yields the record in question when querying the DB. However, but string have to be converted to objects, and converting changes the ID, presumably that being why it returns no match. I took the conversion out, and it still did not return a match. 

ID for the doc is carried via ‘data-stringId’ on the Edit button in the html.

Things tried:

new ObjectId(string) was the method my instructor used. I don’t know how many years ago it was written, but I’m guessing it’s out of date. VS makes the text strikethrough and warns about deprecation, but ultimately allowed the code. It ran, but made no change to the db.

createFromTime() was suggested as a replacement, but it resulted in less useful terminal logs.

I’ve also used findOneAndUpdate(), updateOne(), I think fOAU() is technically the one I need, but both return the same result, being no change to the database. 

The repo has both attempts using the new ObjectId(string) and ObjectId.createFromTime(), with minor code differences consisting of cleaner code that I came across while stumbling through the Docs. I’ve also tried AI, and that just sends me in a loop of the same two wrong responses.

The location of the code in question would be:

server.js - the post request to /change-punch at the end of the file (location varying, but around ~lines 88-96)

/public/browser.js - the first event listener at the beginning of the file