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
const schema = { | |
response: { | |
'2xx': { | |
type: 'object', | |
properties: { | |
value: { type: 'string' }, | |
otherValue: { type: 'boolean' } | |
} | |
}, |
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
'use strict' | |
const fastify = require('fastify')() | |
const handler = (req, reply) => { | |
reply.send({ hello: 'world' }) | |
} | |
const route = { | |
method: 'GET', |
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
const middleware = require('./Middleware') | |
const create = handler => ({ | |
name: 'user-create', | |
path: '/user', | |
version: '1.0.1', | |
method: 'post', | |
handler: () => handler | |
}) |
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
test('Inject GET request fastify', t => { | |
const fastify = Fastify() | |
const payload = { | |
hello: 'world' | |
} | |
fastify.get('/', (req, reply) => { | |
reply.send(payload) | |
}) |
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 service from './service-http' | |
const SET_USER = 'user/SET_USER' | |
const state = { | |
user: '' | |
} | |
const actions = { |
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
class Car { | |
constructor(count, currentState) { | |
this.count = 0 | |
this.currentState = new Red(this) | |
} | |
change (state) { | |
if (this.count++ >= 10) { | |
return | |
} |
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> | |
<section class="footer-accordeon" :class="{ '-open': open }"> | |
<header class="header" @click="open = !open"> | |
<h4 class="title">{{ title }}</h4> | |
<batista-icon class="icon" icon="arrow_down" size="9" /> | |
</header> | |
<div class="content" :style="contentStyle"> | |
<slot /> | |
</div> | |
</section> |
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
const img = ['images/education/bauru/elementaryI/carousel02', 'images/education/bauru/elementaryI/carousel01' ] | |
// example should imagens path | |
this.grade.images.forEach((img) => { | |
this.$fireApp.storage().ref().child(img).getDownloadURL().then((url) => { | |
this.images.push(url) | |
}) | |
}) |
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
var user = event.data.val() | |
var { age, email, grade, name, phone, text, unit } = user | |
const destination = unit === 'Perdizes' ? '[email protected]' : '[email protected]' | |
const to = project === 'batista-webapp' ? destination : '[email protected]' | |
console.log('projeto:', project) | |
var data = { |
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 const http = axios.create({ | |
baseURL: process.env.SUA_API | |
}) | |
export default function install (Vue) { | |
Object.defineProperty(Vue.prototype, '$http', { | |
get: () => http | |
}) |
NewerOlder