Skip to content

Commit

Permalink
Rename data to formData in the UrlShortener component
Browse files Browse the repository at this point in the history
  • Loading branch information
antimech committed Dec 8, 2023
1 parent 0cb395e commit 2d576b1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions resources/js/Components/UrlShortener.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ const errors = ref([]);
// functions that mutate state and trigger updates
async function shorten() {
const data = {
const formData = {
'link': link.value,
'custom_alias': customAlias.value,
'expired_at': expiredAt.value,
};
try {
const response = await axios.post(route('link.store'), data);
const response = await axios.post(route('link.store'), formData);
const responseData = response.data.data;
shortLink.value = responseData.short_link;
shortLinks.value.push({
Expand Down

0 comments on commit 2d576b1

Please sign in to comment.