This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { checkResponse, get, post } from '@/helpers/http' | |
| export function getCSRFToken() { | |
| return get('/api/security/csrf/token') | |
| .then(checkResponse) | |
| } | |
| export function verifyToken(token) { | |
| token = token || localStorage.token |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import axios from 'axios' | |
| export function getCSRFToken() { | |
| return axios.get('/api/security/csrf/token') | |
| .then(response => { | |
| // Save token | |
| // May be call next may be it is enough | |
| }) | |
| .catch(error => { | |
| if (error.status === 401) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { loginUser, getCSRFToken, verifyToken } from '@/api/security' | |
| export default { | |
| /* | |
| * Check if token set | |
| * If token set | |
| * Then verify token | |
| * If token is valid | |
| * Then parse it and save it | |
| * Also show error messages |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| """AsyncIO""" | |
| import aiohttp | |
| import asyncio | |
| import async_timeout | |
| import json | |
| links = [ | |
| "http://localhost:4000/106410.json", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <template> | |
| <div class="awesome"> | |
| CONTENTS | |
| </div> | |
| </template> | |
| <style lang="sass" scoped> | |
| .awesome | |
| background: white | |
| </style> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <template> | |
| <div class="awesome"> | |
| <img class="awesome__logo" src="./assets/logo.png"> | |
| <h2 class="awesome__heading">Bla</h2> | |
| </div> | |
| </template> | |
| <style lang="sass" scoped> | |
| .awesome |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <template> | |
| <div> | |
| <Awesome dark></Awesome> | |
| <Awesome raised></Awesome> | |
| <!-- OR directly augmenting class name with required mofidier --> | |
| <Awesome class="awesome--dark awesome--raised"></Awesome> | |
| </div> | |
| </template> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <template> | |
| <div :class="classes"> | |
| <img class="awesome__logo" src="@/assets/logo.png"> | |
| <h2 class="awesome__heading">Awesome</h2> | |
| </div> | |
| </template> | |
| <script> | |
| export default { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <template> | |
| <Awesome class="awesome--dark awesome--raised"></Awesome> | |
| </template> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <template> | |
| <div class="awesome"> | |
| <img class="awesome__logo" src="@/assets/logo.png"> | |
| <h2 class="awesome__heading">Awesome</h2> | |
| </div> | |
| </template> | |
| <script> | |
| export default { |