Update example

This commit is contained in:
thosakwe 2017-07-15 11:20:47 -04:00
parent 6a111b12cf
commit 4b63fcde59

View file

@ -78,12 +78,12 @@ AngelConfigurer connectToCarsTable(PostgreSQLConnection connection) {
app.container.singleton(connection); app.container.singleton(connection);
// Attach the controller we create below // Attach the controller we create below
await app.configure(new CarService(connection)); await app.configure(new CarController(connection));
}; };
} }
@Expose('/cars') @Expose('/cars')
class CarService extends Controller { class CarController extends Controller {
// The `connection` will be injected. // The `connection` will be injected.
@Expose('/recalled_since_2008') @Expose('/recalled_since_2008')
carsRecalledSince2008(PostgreSQLConnection connection) { carsRecalledSince2008(PostgreSQLConnection connection) {