acronym-web-app's People
acronym-web-app's Issues
Error: Non Unique Record in Database
Steps to recreate:
This query:
acronyms?bullets=SS
Expected:
Normal API response
Actual:
Results in the following response:
{
"timestamp":"2019-04-28T06:24:43.373+0000",
"status":500,
"error":"Internal Server Error",
"message":"Query {
\"$java\" : Query: { \"name\" : \"SS\" },
Fields: { },
Sort: { }
} returned non unique result.","path":"/acronyms"
}
The Issue:
Looking at the mongo inject script, these two records exist on separate lines:
{"name": "SS","definition": ["Submarine"]},
{"name": "SS","definition": ["Sea State (Number)"]},
The Fix:
I would assume these should be combined:
{"name": "SS","definition": ["Sea State (Number)", "Submarine"]},
I didn't look to see if any of the other records were repeated.
Request at acronyms endpoint with no DB running hangs
If the app can't communicate with mongo, the request hangs in the browser.
Duplicate acronym in bullets returns two objects of the same definition
It should only return one definition, even if the airman writes AA twice, for example.
API Response Format Request
Description:
In the DB, the description field is an array of descriptions. It would make that field slightly easier to consume on the front end if it could be sent as an array, instead of as a single string, as it is currently sent.
Current Response Format:
{"acronyms": [
{
"name":"AA",
"definition":"Assessment Agent,Avenue Of Approach"
},
{
// more acronyms
}
]}
Requested Response Format:
{"acronyms": [
{
"name":"AA",
"definition": [ "Assessment Agent", "Avenue Of Approach"]
},
{
// more acronyms
}
]}
Example
{
name: "GB",
description: "Group Buffer,Sarin, A Nerve Agent"
}
Commas are not used in exactly the same way for every record.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.