Skip to content
Snippets Groups Projects
Commit 40d7083f authored by Sarthak Shrivastava's avatar Sarthak Shrivastava
Browse files

broken orgs, rest fixedd

parent 84bc3c38
No related branches found
No related tags found
No related merge requests found
......@@ -11,10 +11,10 @@ export const CreateOrganization = (props) => {
const handleSubmit = (e) => {
e.preventDefault();
Axios.post("http://localhost:8080/organization/add", {
desc: desc,
email: email,
name: name,
ownerEmail: ownerEmail,
desc: desc,
// orgId: orgId,
}).then((response) => {
console.log(response);
......
......@@ -8,6 +8,6 @@ import com.example.accessingdatamysql.Organization;
// This will be AUTO IMPLEMENTED by Spring into a Bean called userRepository
// CRUD refers Create, Read, Update, Delete
public interface OrgRepository extends CrudRepository<Organization, String> {
public interface OrgRepository extends CrudRepository<Organization, Integer> {
}
\ No newline at end of file
......@@ -15,6 +15,10 @@ public class Organization {
private String desc;
@Id
@Column(nullable = false)
private Integer organizationId;
public String getEmail() {
return email;
}
......
spring.jpa.hibernate.ddl-auto=create
spring.jpa.hibernate.ddl-auto=update
spring.datasource.url=jdbc:mysql://${MYSQL_HOST:localhost}:3306/inventory
spring.datasource.username=root
spring.datasource.password=CSD@mysql-1872
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment