-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4cd51ea
commit c6db1b8
Showing
7 changed files
with
31 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
const courseManagerBackendUrl = | ||
process.env.NEXT_PUBLIC_COURSE_MANAGER_SERVICE_BACKEND_URL || | ||
'http://localhost:3000'; | ||
const marketplaceBackendUrl = | ||
process.env.NEXT_PUBLIC_MARKETPLACE_SERVICE_BACKEND_URL || | ||
'http://localhost:3000'; | ||
module.exports = { | ||
courseManagerBackendUrl, | ||
marketplaceBackendUrl, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
import { courseManagerBackendUrl } from '@root/config'; | ||
import axios from 'axios'; | ||
|
||
// course manager | ||
export const getAllProviders = async () => { | ||
const data = await axios.get( | ||
`${process.env.NEXT_PUBLIC_COURSE_MANAGER_SERVICE_BACKEND_URL}/api/admin/providers` | ||
`${courseManagerBackendUrl}/api/admin/providers` | ||
); | ||
return data.data.data; | ||
}; | ||
|
||
// course manager | ||
export const approvedAccount = async (providerId: string) => { | ||
await axios.patch( | ||
`${process.env.NEXT_PUBLIC_COURSE_MANAGER_SERVICE_BACKEND_URL}/api/admin/providers/${providerId}/verify` | ||
`${courseManagerBackendUrl}/api/admin/providers/${providerId}/verify` | ||
); | ||
}; | ||
|
||
// course manager | ||
export const rejectAccount = async (providerId: string, reason: string) => { | ||
await axios.patch( | ||
`${process.env.NEXT_PUBLIC_COURSE_MANAGER_SERVICE_BACKEND_URL}/api/admin/providers/${providerId}/reject`, | ||
`${courseManagerBackendUrl}/api/admin/providers/${providerId}/reject`, | ||
{ rejectionReason: reason } | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters