feat: implement logging for ad interactions with new API and update banner component
This commit is contained in:
@@ -4,7 +4,6 @@ import { getValidatedFormData } from 'remix-hook-form'
|
||||
import { XiorError } from 'xior'
|
||||
|
||||
import { updateSubscribeRequest } from '~/apis/admin/update-subscribe'
|
||||
import { getUser } from '~/apis/news/get-user'
|
||||
import {
|
||||
subscribeSchema,
|
||||
type TSubscribeSchema,
|
||||
@@ -34,18 +33,15 @@ export const action = async ({ request }: Route.ActionArgs) => {
|
||||
console.log('payload', payload) // eslint-disable-line no-console
|
||||
|
||||
// TODO: will run after payment success
|
||||
const { data: updateSubscribeData } = await updateSubscribeRequest({
|
||||
const { data: subscribeData } = await updateSubscribeRequest({
|
||||
payload,
|
||||
accessToken,
|
||||
})
|
||||
console.log(updateSubscribeData) // eslint-disable-line no-console
|
||||
|
||||
const { data: userData } = await getUser({ accessToken })
|
||||
|
||||
return data(
|
||||
{
|
||||
success: true,
|
||||
user: userData,
|
||||
subscribeData,
|
||||
},
|
||||
{
|
||||
status: 200,
|
||||
|
||||
Reference in New Issue
Block a user