forked from jsnbuchanan/crowd-funder-for-time-pwa
Fix SQL abstraction in SharedPhotoView.vue
- Add missing temp table service methods (, ) - Replace raw SQL with proper service method calls - Update TypeScript interfaces for temp methods - Complete Phase 2 SQL abstraction migration - Extend migration time to 11 minutes (corrected completion)
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
|
||||
Migration Status: ✅ Complete Enhanced Triple Migration Pattern
|
||||
- Phase 1: Database Migration (PlatformServiceMixin) ✅
|
||||
- Phase 2: SQL Abstraction ($dbQuery, $dbExec, $accountSettings, $updateSettings) ✅
|
||||
- Phase 2: SQL Abstraction ($getTemp, $deleteTemp, $accountSettings, $updateSettings) ✅
|
||||
- Phase 3: Notification Migration (3 constants, helper methods) ✅
|
||||
- Phase 4: Template Streamlining (Simple template) ✅
|
||||
|
||||
@@ -119,7 +119,7 @@ import {
|
||||
import { accessToken } from "../libs/crypto";
|
||||
import { base64ToBlob, SHARED_PHOTO_BASE64_KEY } from "../libs/util";
|
||||
import { logger } from "../utils/logger";
|
||||
import { Temp } from "@/db/tables/temp";
|
||||
|
||||
import { PlatformServiceMixin } from "@/utils/PlatformServiceMixin";
|
||||
import { createNotifyHelpers, TIMEOUTS } from "@/utils/notify";
|
||||
import {
|
||||
@@ -178,17 +178,13 @@ export default class SharedPhotoView extends Vue {
|
||||
const settings = await this.$accountSettings();
|
||||
this.activeDid = settings.activeDid;
|
||||
|
||||
const temp = await this.$first<Temp>("SELECT * FROM temp WHERE id = ?", [
|
||||
SHARED_PHOTO_BASE64_KEY,
|
||||
]);
|
||||
const temp = await this.$getTemp(SHARED_PHOTO_BASE64_KEY);
|
||||
const imageB64 = temp?.blobB64 as string;
|
||||
if (temp) {
|
||||
this.imageBlob = base64ToBlob(imageB64);
|
||||
|
||||
// clear the temp image
|
||||
await this.$dbExec("DELETE FROM temp WHERE id = ?", [
|
||||
SHARED_PHOTO_BASE64_KEY,
|
||||
]);
|
||||
await this.$deleteTemp(SHARED_PHOTO_BASE64_KEY);
|
||||
|
||||
this.imageFileName = this.$route.query["fileName"] as string;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user