Skip to content

Commit 5898849

Browse files
marioestradarosavirkt25
authored andcommitted
fix(docs): fix todo-tutorial import service and Promise wrapper
Mention the need for import the services and reflec the Promise<> on value(): method fix #1681
1 parent fa7b547 commit 5898849

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

docs/site/todo-tutorial-geocoding-service.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ export class GeocoderServiceProvider implements Provider<GeocoderService> {
138138
protected datasource: juggler.DataSource = new GeocoderDataSource(),
139139
) {}
140140

141-
value(): GeocoderService {
141+
value(): Promise<GeocoderService> {
142142
return getService(this.datasource);
143143
}
144144
}
@@ -178,12 +178,14 @@ export class Todo extends Entity {
178178
Finally, modify `TodoController` to look up the address and convert it to GPS
179179
coordinates when a new Todo item is created.
180180

181-
Modify the Controller constructor to receive `GeocoderService` as a new
182-
dependency.
181+
Import `GeocodeService` interface into the `TodoController` and then modify the
182+
Controller constructor to receive `GeocodeService` as a new dependency.
183183

184184
#### src/controllers/todo.controller.ts
185185

186186
```ts
187+
import {GeocoderService} from '../services';
188+
187189
export class TodoController {
188190
constructor(
189191
@repository(TodoRepository) protected todoRepo: TodoRepository,

0 commit comments

Comments
 (0)