Daniel Gato
01/15/2022, 8:49 PMexport default class ApiStack extends sst.Stack {
api;
constructor(scope, id, props) {
super(scope, id, props);
...
Why do we expose api? Is there any requirement of SST for us to do that?thdxr
01/15/2022, 8:50 PMDaniel Gato
01/15/2022, 8:54 PMconst apiStack = new ApiStack(app, 'api', {...});
const authStack = new AuthStack(app, 'auth', {
api: apiStack.api,
uploadsBucket: storageStack.uploadsBucket,
});
?thdxr
01/15/2022, 8:58 PMDaniel Gato
01/15/2022, 9:00 PMFrank
Daniel Gato
01/16/2022, 2:14 PMexport default class AuthStack extends sst.Stack {
auth;
constructor(scope, id, props) {
super(scope, id, props);
const { api, uploadsBucket } = props;
this.auth = new sst.Auth(this, 'Auth', { ... });
this.auth.attachPermissionsForAuthUsers([
api,
// ...
]);
// ...
}
}