Skip to content

Instantly share code, notes, and snippets.

@indreklasn
Created December 17, 2019 10:42
Show Gist options
  • Save indreklasn/83fc803e7ce5ce4134d70b74ee6ea403 to your computer and use it in GitHub Desktop.
Save indreklasn/83fc803e7ce5ce4134d70b74ee6ea403 to your computer and use it in GitHub Desktop.
import { client, q } from '../config/db'
const editNote = (noteId, newText) => client.query(
q.Update(
q.Ref(q.Collection('notes'), noteId),
{ data: { text: newText } },
)
)
.then((ret) => console.log(ret))
.catch(err => console.warn(err))
export default editNote
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment