Update endpoint.js