Skip to content

Commit

Permalink
Update ManageSchools.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
nakasyou authored Oct 1, 2023
1 parent 2e4f3bf commit 498e2ad
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions islands/admin/components/ManageSchools.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,20 @@ export default (props: Props) => {
schoolName: string
}[]>([])
const syncSchoolsData = async () => {
let result
try {
result = await ky.post('/admin/api', {
json: {
type: 'get_schools_data',
password: props.password
}
}).json()
} catch (error) {
alert('エラーが発生しました。パスワードが間違っている可能性があります。')
alert(error)
throw error
}
let result
try {
result = await ky.post('/admin/api', {
json: {
type: 'get_schools_data',
password: props.password
}
}).json()
} catch (error) {
alert('エラーが発生しました。パスワードが間違っている可能性があります。')
alert(error)
throw error
}
alert(JSON.stringify(result))
setSchoolsData(result.schoolsData)
}
return <div>
Expand Down

0 comments on commit 498e2ad

Please sign in to comment.