Check user auth in api request

This commit is contained in:
Takeshi Kimata
2024-05-25 12:35:10 +09:00
parent 7a0bb63e7b
commit d6e7c98025
19 changed files with 106 additions and 50 deletions

View File

@@ -4,7 +4,7 @@ const apiServer = Config.apiServer;
/**
* fetch project records
*/
async function fetchProjects() {
async function fetchProjects(jwt: string) {
const url = `${apiServer}/projects`;
try {
@@ -12,6 +12,7 @@ async function fetchProjects() {
method: 'GET',
headers: {
'Content-Type': 'application/json',
Authorization: jwt,
},
});