Skip to content

Adrito-M #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Adrito-M #12

wants to merge 4 commits into from

Conversation

Adrito-M
Copy link

@Adrito-M Adrito-M commented Jul 3, 2022

CSOC Task 3 Vue Submission

Deployed Site
Repo Link

I have completed the following tasks

  • Auth Middleware
  • Login Function
  • Add task
  • Get tasks
  • Update Task
  • Delete Task
  • UI Improvement

Extra Stuff:

Added a search functionality for the todos, for ease of finding and then deleting/updating todos

</main>
</template>

<script lang>
import { defineComponent } from '@nuxtjs/composition-api'
import addTask from '~/components/addTask.vue'
import axios from 'axios'
import Search from '~/components/search.vue';
const API_BASE_URL = 'https://todo-app-csoc.herokuapp.com/';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can also create a configuration for the default request header since the base URL is being used all over the project.

https://axios-http.com/docs/config_defaults

})
</script>

<style>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good use of transitions :)

@@ -0,0 +1,51 @@
<template>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good Feature!

* @hints check what propeties context has
*/
export default defineNuxtMiddleware(({store, route, redirect}) => {
if (store.getters.auth && (route.path === '/login' || route.path === '/register')) return redirect('/')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could have used variables for path and auth token

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants