Refactor frontend components and enhance API integration
- Updated frontend-nuxt.mdc to specify usage of composables for API calls. - Added new AuthCard and ConfirmModal components for improved UI consistency. - Introduced UserAvatar component for user profile display, replacing previous Gravatar implementation. - Implemented useFormSubmit composable for handling form submissions with loading and error states. - Enhanced vitest.config.ts to include coverage reporting for composables and components. - Removed deprecated useAdminApi and useAuth composables to streamline API interactions. - Updated login and setup pages to utilize new components and composables for better user experience.
This commit is contained in:
@@ -73,7 +73,9 @@ var migrations = []func(tx *bbolt.Tx) error{
|
||||
allTiles[string(k)] = zoomTiles
|
||||
return zoom.ForEach(func(tk, tv []byte) error {
|
||||
td := TileData{}
|
||||
json.Unmarshal(tv, &td)
|
||||
if err := json.Unmarshal(tv, &td); err != nil {
|
||||
return err
|
||||
}
|
||||
zoomTiles[string(tk)] = td
|
||||
return nil
|
||||
})
|
||||
@@ -161,7 +163,9 @@ var migrations = []func(tx *bbolt.Tx) error{
|
||||
}
|
||||
return users.ForEach(func(k, v []byte) error {
|
||||
u := User{}
|
||||
json.Unmarshal(v, &u)
|
||||
if err := json.Unmarshal(v, &u); err != nil {
|
||||
return err
|
||||
}
|
||||
if u.Auths.Has(AUTH_MAP) && !u.Auths.Has(AUTH_MARKERS) {
|
||||
u.Auths = append(u.Auths, AUTH_MARKERS)
|
||||
raw, err := json.Marshal(u)
|
||||
|
||||
Reference in New Issue
Block a user