| @ -0,0 +1,15 @@ | |||||
| { | |||||
| "info": { | |||||
| "title": "Aplicação Social Interna", | |||||
| "description": "REST API da Minha Aplicação.", | |||||
| "version": "1.0" | |||||
| }, | |||||
| "components": { | |||||
| "securitySchemes": { | |||||
| "BearerAuth": { | |||||
| "type": "http", | |||||
| "scheme": "bearer" | |||||
| } | |||||
| } | |||||
| } | |||||
| } | |||||
| @ -0,0 +1,12 @@ | |||||
| const dbComunidade = _db.queryFirst(` | |||||
| SELECT imagem FROM comunidade WHERE uid = ? | |||||
| `, _req.getString("uid")) | |||||
| _header.contentTypeJPG() | |||||
| _header.noCache() | |||||
| if (dbComunidade != null && dbComunidade.getString("imagem") != '') { | |||||
| const storageImage = _storage.database("comunidade", "imagem", dbComunidade.getString("imagem")) | |||||
| _out.copy(storageImage.inputStream()) | |||||
| } | |||||
| @ -0,0 +1,8 @@ | |||||
| { | |||||
| "summary": "Infomrações do Utilizador", | |||||
| "description": "Obtém as informaçnoes do utilizador logado.", | |||||
| "type": "object", | |||||
| "properties": { | |||||
| }, | |||||
| "required": [ ] | |||||
| } | |||||
| @ -0,0 +1,23 @@ | |||||
| { | |||||
| "type": "object", | |||||
| "properties": { | |||||
| "name": { | |||||
| "type": "string-not-empty" | |||||
| }, | |||||
| "surname": { | |||||
| "type": "string-not-empty" | |||||
| }, | |||||
| "email": { | |||||
| "type": "string-not-empty" | |||||
| }, | |||||
| "city": { | |||||
| "type": "string-not-empty" | |||||
| } | |||||
| }, | |||||
| "required": [ | |||||
| "name", | |||||
| "surname", | |||||
| "email", | |||||
| "city" | |||||
| ] | |||||
| } | |||||
| @ -0,0 +1,28 @@ | |||||
| { | |||||
| "summary": "Registo do Utilizador", | |||||
| "description": "Permite registar uma nova conta com o utilizador associado.", | |||||
| "type": "object", | |||||
| "properties": { | |||||
| "name": { | |||||
| "type": "string-not-empty" | |||||
| }, | |||||
| "surname": { | |||||
| "type": "string-not-empty" | |||||
| }, | |||||
| "city_uid": { | |||||
| "type": "uid" | |||||
| }, | |||||
| "email": { | |||||
| "type": "string-not-empty" | |||||
| }, | |||||
| "username": { | |||||
| "type": "string-not-empty" | |||||
| }, | |||||
| "password": { | |||||
| "type": "string-not-empty" | |||||
| } | |||||
| }, | |||||
| "required": [ | |||||
| "name", "surname", "city_uid", "email", "username", "password" | |||||
| ] | |||||
| } | |||||
| @ -0,0 +1,11 @@ | |||||
| { | |||||
| "type": "object", | |||||
| "properties": { | |||||
| "result": { | |||||
| "type": "boolean" | |||||
| } | |||||
| }, | |||||
| "required": [ | |||||
| "result" | |||||
| ] | |||||
| } | |||||
| @ -0,0 +1,15 @@ | |||||
| { | |||||
| "type": "object", | |||||
| "properties": { | |||||
| "result": { | |||||
| "type": "boolean" | |||||
| }, | |||||
| "error": { | |||||
| "type": "string-not-empty" | |||||
| } | |||||
| }, | |||||
| "required": [ | |||||
| "result", | |||||
| "error" | |||||
| ] | |||||
| } | |||||
| @ -0,0 +1,15 @@ | |||||
| import React, { useState, useEffect } from 'react'; | |||||
| import _service from '@netuno/service-client'; | |||||
| export default ({ data })=> { | |||||
| useEffect(() => { | |||||
| }, []); | |||||
| const servicesPrefix = _service.config().prefix; | |||||
| return ( | |||||
| <li style={ { backgroundImage: `url(${servicesPrefix}public/communities/image?uid=${data.uid})` } }> | |||||
| <h1>{data.name}</h1> | |||||
| </li> | |||||
| ); | |||||
| }; | |||||
| @ -0,0 +1,19 @@ | |||||
| .communities { | |||||
| &__list { | |||||
| list-style: none; | |||||
| padding: 0; | |||||
| margin: 0; | |||||
| > li { | |||||
| background-size: cover; | |||||
| background-repeat: no-repeat; | |||||
| background-position: 50% 50%; | |||||
| height: 200px; | |||||
| > h1 { | |||||
| background-color: rgba(0, 0, 0, 0.75); | |||||
| color: #ffffff; | |||||
| padding: 10px; | |||||
| } | |||||
| } | |||||
| } | |||||
| } | |||||