-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #124 from aquariophilie/feature/validation_and_lookup
Feature/validation and lookup
- Loading branch information
Showing
20 changed files
with
267 additions
and
129 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,11 @@ | ||
{ | ||
"parser": "@typescript-eslint/parser", | ||
"plugins": ["@typescript-eslint"], | ||
"extends": [ | ||
"plugin:@typescript-eslint/recommended" | ||
], | ||
"rules": { | ||
"@typescript-eslint/no-var-requires": 0, | ||
"@typescript-eslint/no-empty-interface": 0 | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<title>Blobfishes app</title> | ||
<meta charset="utf-8" /> | ||
<link rel="icon" href="/favicon.png" /> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"> | ||
|
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,31 @@ | ||
import axios from 'axios' | ||
import { | ||
API_PATH | ||
} from './api'; | ||
|
||
const apiAuthorPath = `${API_PATH}/author`; | ||
|
||
function findAuthors() { | ||
return axios.get(apiAuthorPath); | ||
} | ||
|
||
function insertAuthor(payload) { | ||
return axios.post(apiAuthorPath, payload); | ||
} | ||
|
||
function updateAuthor(id, payload) { | ||
const path = `${apiAuthorPath}/${id}`; | ||
return axios.put(path, payload); | ||
} | ||
|
||
function removeAuthor(id) { | ||
const path = `${apiAuthorPath}/${id}`; | ||
return axios.delete(path); | ||
} | ||
|
||
export const apiAuthor = { | ||
findAuthors, | ||
insertAuthor, | ||
updateAuthor, | ||
removeAuthor | ||
} |
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,31 @@ | ||
import axios from 'axios' | ||
import { | ||
API_PATH | ||
} from './api'; | ||
|
||
const apiBookPath = `${API_PATH}/book`; | ||
|
||
function findBooks() { | ||
return axios.get(apiBookPath); | ||
} | ||
|
||
function insertBook(payload) { | ||
return axios.post(apiBookPath, payload); | ||
} | ||
|
||
function updateBook(id, payload) { | ||
const path = `${apiBookPath}/${id}`; | ||
return axios.put(path, payload); | ||
} | ||
|
||
function removeBook(id) { | ||
const path = `${apiBookPath}/${id}`; | ||
return axios.delete(path); | ||
} | ||
|
||
export const apiBook = { | ||
findBooks, | ||
insertBook, | ||
updateBook, | ||
removeBook | ||
} |
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 @@ | ||
export const API_PATH = '/api'; |
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.