You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
follow the todo tutorial and the "Bonus: Integrate with a geo-coding service"
Current Behavior
at the end of "Bonus: Integrate with a geo-coding service" there is an incorrect snippet:
export class TodoController {
// constructor, etc.
@post('/todos')
async createTodo(@requestBody() todo: Todo) {
if (!todo.title) {
throw new HttpErrors.BadRequest('title is required');
}
if (todo.remindAtAddress) {
// TODO handle "address not found"
const geo = await this.geoService.geocode(todo.remindAtAddress);
// Encode the coordinates as "lat,lng"
todo.remindAtGeo = `${geo[0].y},${geo[0].x}`;
}
return this.todoRepo.create(todo);
}
// other endpoints remain unchanged
}
Steps to reproduce
follow the todo tutorial and the "Bonus: Integrate with a geo-coding service"
Current Behavior
at the end of "Bonus: Integrate with a geo-coding service" there is an incorrect snippet:
https://loopback.io/doc/en/lb4/todo-tutorial-geocoding-service.html
Expected Behavior
the correct one must be:
The text was updated successfully, but these errors were encountered: