CEC-749 Generate cert UI (#141)
* Add Create Certificate page * Tests * Update permission check * Use Azure
This commit is contained in:
17
src/services/certificatesAPI.js
Normal file
17
src/services/certificatesAPI.js
Normal file
@@ -0,0 +1,17 @@
|
||||
import { getAuthHeaderOptions, fetchRespHandler } from "../utils/http";
|
||||
|
||||
const API_ENDPOINT = process.env.REACT_APP_CERT_SERVICE_URL;
|
||||
|
||||
const certificatesAPI = {
|
||||
create: async (data, token) =>
|
||||
fetch(`${API_ENDPOINT}/create`, {
|
||||
method: "POST",
|
||||
headers: Object.assign(
|
||||
{ "Content-Type": "application/json" },
|
||||
getAuthHeaderOptions(token)
|
||||
),
|
||||
body: JSON.stringify(data),
|
||||
}).then(fetchRespHandler),
|
||||
};
|
||||
|
||||
export default certificatesAPI;
|
||||
Reference in New Issue
Block a user