18 lines
372 B
TypeScript
18 lines
372 B
TypeScript
import axios from "axios";
|
|
import { config } from "../config";
|
|
|
|
const createProject = async (name: string) => {
|
|
try {
|
|
const response = await axios.put(`${config.url}/project/create`, {
|
|
name: name,
|
|
});
|
|
|
|
return response.data;
|
|
} catch (error) {
|
|
console.error("Error creating project:", error);
|
|
throw error;
|
|
}
|
|
};
|
|
|
|
export default createProject;
|