tokenRefresh, crear y editar productos con img funcionando
This commit is contained in:
@@ -118,15 +118,15 @@ export const getProductById = async (id: number) => {
|
||||
};
|
||||
|
||||
export const createProductAction = async (payload: FormData) => {
|
||||
const session = await auth()
|
||||
const userId = session?.user?.id
|
||||
// const session = await auth()
|
||||
// const userId = session?.user?.id
|
||||
|
||||
if (userId) {
|
||||
payload.append('userId', String(userId));
|
||||
}
|
||||
// if (userId) {
|
||||
// payload.append('userId', String(userId));
|
||||
// }
|
||||
|
||||
const [error, data] = await safeFetchApi(
|
||||
productMutate,
|
||||
test,
|
||||
'/products',
|
||||
'POST',
|
||||
payload,
|
||||
|
||||
Reference in New Issue
Block a user