Make public from creation modal
This commit is contained in:
@@ -83,6 +83,13 @@ export const actions: Actions = {
|
||||
let latitude = formData.get('latitude') as string | null;
|
||||
let longitude = formData.get('longitude') as string | null;
|
||||
let collection = formData.get('collection') as string | null;
|
||||
let is_public = formData.get('is_public') as string | null | boolean;
|
||||
|
||||
if (is_public) {
|
||||
is_public = true;
|
||||
} else {
|
||||
is_public = false;
|
||||
}
|
||||
|
||||
// check if latitude and longitude are valid
|
||||
if (latitude && longitude) {
|
||||
@@ -127,6 +134,7 @@ export const actions: Actions = {
|
||||
formDataToSend.append('description', description || '');
|
||||
formDataToSend.append('latitude', latitude || '');
|
||||
formDataToSend.append('longitude', longitude || '');
|
||||
formDataToSend.append('is_public', is_public.toString());
|
||||
|
||||
if (!isNaN(Number(collection))) {
|
||||
if (collection !== null) {
|
||||
|
||||
Reference in New Issue
Block a user