implementation of external app#323
Conversation
There was a problem hiding this comment.
Hey @nxtcoder19 - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟡 General issues: 3 issues found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.
| return r.Domain.InterceptApp(newResourceContext(cc, envName), appname, deviceName, intercept, pmappings) | ||
| } | ||
|
|
||
| // CoreCreateExternalApp is the resolver for the core_createExternalApp field. |
There was a problem hiding this comment.
suggestion: Consider adding logging for error cases
Adding logging for error cases within the resolver functions can help with debugging and monitoring. Consider logging the errors before returning them.
| // CoreCreateExternalApp is the resolver for the core_createExternalApp field. | |
| func (r *mutationResolver) CoreCreateExternalApp(ctx context.Context, envName string, externalApp entities.ExternalApp) (*entities.ExternalApp, error) { | |
| cc, err := toConsoleContext(ctx) | |
| if err != nil { | |
| log.Printf("Error converting to console context: %v", err) | |
| return nil, err | |
| } |
| return true, nil | ||
| } | ||
|
|
||
| // CoreListExternalApps is the resolver for the core_listExternalApps field. |
There was a problem hiding this comment.
suggestion: Consider adding logging for error cases
Adding logging for error cases within the resolver functions can help with debugging and monitoring. Consider logging the errors before returning them.
| // CoreListExternalApps is the resolver for the core_listExternalApps field. | |
| import "log" | |
| // CoreListExternalApps is the resolver for the core_listExternalApps field. | |
| func (r *queryResolver) CoreListExternalApps(ctx context.Context, envName string, search *model.SearchExternalApps, pq *repos.CursorPagination) (*model.ExternalAppPaginatedRecords, error) { | |
| cc, err := toConsoleContext(ctx) | |
| if err != nil { | |
| log.Printf("Error converting to console context: %v", err) | |
| return nil, err | |
| } |
| @@ -0,0 +1,52 @@ | |||
| package entities | |||
There was a problem hiding this comment.
suggestion: Consider adding validation for ExternalApp fields
Adding validation for the fields in the ExternalApp struct can help ensure data integrity and prevent potential issues.
implementation of external app
Resolves #322