Conversation
proxy_backends/collection/schema.js
Outdated
| "apiId": { | ||
| type: String | ||
| }, | ||
| "apiUmbrella": { |
There was a problem hiding this comment.
@brylie Is this going to be like this, that type of the proxy is hardcoded in schema? Or are you changing it?
|
@jykae we have decided to have specific fields based on the type of proxy, e.g. This is similar to how @frenchbread implemented the Proxy feature, where he created sub-schemas for each supported proxy. Right now we are only aiming to support API Umbrella, but this approach allows us to easily enable more proxies. |
|
Suggested changes made. Please review. |
|
@frenchbread please also note that in your Proxy module we should have only one We will be appending |
|
@frenchbread it looks like it. I will make some inline comments. |
| import _ from 'lodash'; | ||
|
|
||
| Apis.helpers({ | ||
| currentUserCanEdit () { |
There was a problem hiding this comment.
I'd suggest writing this helper shorter, e.g:
currentUserCanEdit () {
const userId - Meteor.userId();
if (userId) {
const isManager = _.includes(this.managerIds, userId);
const isAdmin = Roles.userIsInRole(userId, ['admin']);
return (isManager || is Admin);
}
return false;
}I think this looks more compact & easy to read 😃
|
@frenchbread I made the suggested changes. Please review. |
|
I don't want to do the 'base path live preview' at this point, so that we can merge this work soon. If desirable, we can file the 'base path live preview' as an enhancement task. |
|
@brylie On Api details tab, shouldn't the the base URL display the actual URL for requests? |
|
Everything else looks cool. Good job on refactoring bunch of files to fix eslist 👍 |
|
@frenchbread There is a continuation task for the details tab. If that is the only thing missing, please merge this. Illya is waiting for this task to be merged. |
|
@frenchbread Is it possible for you to merge during the afternoon? If not, I can reassign the task |
Closes #1233
Closes #1344
Changes
apiBackendtoapiwhere possibleApiMetadatacollection to follow project filename convention