File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff 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 {
178178Finally, modify ` TodoController ` to look up the address and convert it to GPS
179179coordinates 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+
187189export class TodoController {
188190 constructor (
189191 @repository (TodoRepository ) protected todoRepo : TodoRepository ,
You can’t perform that action at this time.
0 commit comments