Skip to content

armgit / memos

Public Imported from GitHub
0

Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.

fix: find latest migration history (#190)

boojackdc9f53144773
diff --git a/store/db/migration_history.go b/store/db/migration_history.go
index ef56da6ea..bf230b001 100644
--- a/store/db/migration_history.go
+++ b/store/db/migration_history.go
@@ -72,7 +72,7 @@ func findMigrationHistoryList(ctx context.Context, tx *sql.Tx, find *MigrationHi
FROM
migration_history
WHERE ` + strings.Join(where, " AND ") + `
- ORDER BY created_ts DESC
+ ORDER BY version DESC
`
rows, err := tx.QueryContext(ctx, query, args...)
if err != nil {
diff --git a/web/src/pages/Auth.tsx b/web/src/pages/Auth.tsx
index 9c63c0a9a..27ee93ada 100644
--- a/web/src/pages/Auth.tsx
+++ b/web/src/pages/Auth.tsx
@@ -142,7 +142,7 @@ const Auth: React.FC<Props> = () => {
<Only when={!pageLoadingState.isLoading}>
<button
className={`btn signin-btn ${actionBtnLoadingState.isLoading ? "requesting" : ""}`}
- onClick={() => (siteHost ? handleSigninBtnsClick() : handleSigninBtnsClick())}
+ onClick={() => (siteHost ? handleSigninBtnsClick() : handleSignUpAsHostBtnsClick())}
>
<Only when={actionBtnLoadingState.isLoading}>
<Icon.Loader className="img-icon" />