[SHOPTIME-3324] 약관 철회 후 재동의 시 과거 데이터 유지되는 현상

[SHOPTIME-3325] 앱 삭제 후 재설치 시 과거 데이터 유지됨

lunaSend db8 추가 (테스트 필요)
This commit is contained in:
hyunwoo93.cha
2025-01-15 16:42:28 +09:00
parent 03638cc602
commit cc6bcd225b
3 changed files with 87 additions and 0 deletions

View File

@@ -319,3 +319,50 @@ export const deleteOldDb8 = (kind, { onSuccess, onFailure, onComplete }) => {
onComplete,
});
};
export const checkFirstLaunch = ({ onSuccess, onFailure, onComplete }) => {
if (typeof window === "object" && !window.PalmSystem) {
console.log("LUNA SEND checkFirstLaunch");
return;
}
return new LS2Request().send({
service: "luna://com.webos.service.db",
method: "find",
parameters: {
query: {
from: `${appinfo.id}:1`,
where: [{ prop: "type", op: "=", val: "app_init" }],
},
},
onSuccess,
onFailure,
onComplete,
});
};
export const saveFirstLaunchInfo = ({ onSuccess, onFailure, onComplete }) => {
if (typeof window === "object" && !window.PalmSystem) {
console.log("LUNA SEND saveFirstLaunchInfo");
onSuccess({ returnValue: true });
return;
}
return new LS2Request().send({
service: "luna://com.webos.service.db",
method: "put",
parameters: {
object: [
{
_kind: `${appinfo.id}:1`,
type: "app_init",
initialized: true,
timestamp: new Date().toISOString(),
},
],
},
onSuccess,
onFailure,
onComplete,
});
};