Refactor API routes and controllers for improved structure and clarity
- Updated API route structure to remove versioning and consolidate endpoints. - Refactored routing in `server.go` to use a unified `/api` prefix for all controllers. - Added new `ChannelController`, `ConversationController`, and `MessageController` to handle specific API functionalities. - Removed deprecated `OpenImContextMiddleware` and related logic. - Enhanced channel validation logic in `ChannelService` and `ChannelRepository`. - Updated frontend API calls to align with new endpoint structure.
This commit is contained in:
@@ -100,7 +100,7 @@
|
||||
if (!baseUrl || !config.channelId || typeof fetch !== "function") {
|
||||
return Promise.resolve(config);
|
||||
}
|
||||
var url = baseUrl + "/api/open/im/widget/config?channelId=" + encodeURIComponent(config.channelId);
|
||||
var url = baseUrl + "/api/channel/config?channelId=" + encodeURIComponent(config.channelId);
|
||||
return fetch(url, {
|
||||
method: "GET",
|
||||
cache: "no-store",
|
||||
|
||||
Reference in New Issue
Block a user