fix: add temporary logs
This commit is contained in:
parent
80adc4c694
commit
9b2c10813a
|
@ -223,11 +223,18 @@ export class UnbodyService {
|
||||||
const oldData = { ...this.data }
|
const oldData = { ...this.data }
|
||||||
|
|
||||||
this.data = newData
|
this.data = newData
|
||||||
if (this.firstLoad) this.firstLoad = false
|
|
||||||
callback(this.data)
|
callback(this.data)
|
||||||
|
|
||||||
|
console.log({
|
||||||
|
firstLoad: this.firstLoad,
|
||||||
|
isVercel,
|
||||||
|
isBuildTime,
|
||||||
|
sendDiscordNotifications,
|
||||||
|
})
|
||||||
|
|
||||||
if (!this.firstLoad && !isVercel) {
|
if (!this.firstLoad && !isVercel) {
|
||||||
const changes = isBuildTime ? [] : this.findChanges(oldData, newData)
|
const changes = isBuildTime ? [] : this.findChanges(oldData, newData)
|
||||||
|
console.log('changes', changes.length)
|
||||||
|
|
||||||
if (sendDiscordNotifications) {
|
if (sendDiscordNotifications) {
|
||||||
const [_res, err] = await settle(() =>
|
const [_res, err] = await settle(() =>
|
||||||
|
@ -245,6 +252,8 @@ export class UnbodyService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.firstLoad) this.firstLoad = false
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error)
|
console.error(error)
|
||||||
} finally {
|
} finally {
|
||||||
|
@ -636,7 +645,7 @@ export class UnbodyService {
|
||||||
data: T | null = null,
|
data: T | null = null,
|
||||||
errors: any = null,
|
errors: any = null,
|
||||||
): ApiResponse<T> => {
|
): ApiResponse<T> => {
|
||||||
if (errors) console.log(errors)
|
if (errors) console.error(errors)
|
||||||
if (errors || !data) {
|
if (errors || !data) {
|
||||||
return {
|
return {
|
||||||
data: data as any,
|
data: data as any,
|
||||||
|
|
Loading…
Reference in New Issue