Git Product home page Git Product logo

mango's People

Contributors

leeaustinadams avatar

Stargazers

 avatar

Watchers

 avatar

mango's Issues

Implement input validation

  • Users
    • Duplicate usernames
  • Articles
    • Duplicate titles (slugs)
    • Empty titles
  • Pages
    • Duplicate titles (slugs)
    • Empty titles
  • Etc

Users can't alter their account settings

Users should be able to change

  • First name
  • Last name
  • Twitter handle
  • Email address

Users should not be able to change

  • Username
  • Account creation date
  • Roles (unless they are Admin)

Can't post media for pages

article-id query parameter is always specified, need to add page-id query param and call dp/update-page-media instead of dp/update-blog-article-media

Clean Up Licensing

I think there are some places claiming copyright, some places eclipse, etc etc. Need to unify to an understandable license.

Handle lack of database connection more gracefully

Jul 19, 2019 2:33:13 PM com.mongodb.diagnostics.logging.JULLogger log
INFO: Cluster created with settings {hosts=[127.0.0.1:27017], mode=SINGLE, requiredClusterType=UNKNOWN, serverSelectionTimeout='30000 ms', maxWaitQueueSize=500}
Jul 19, 2019 2:33:13 PM com.mongodb.diagnostics.logging.JULLogger log
INFO: Exception in monitor thread while connecting to server 127.0.0.1:27017
com.mongodb.MongoSocketOpenException: Exception opening socket
	at com.mongodb.connection.SocketStream.open(SocketStream.java:63)
	at com.mongodb.connection.InternalStreamConnection.open(InternalStreamConnection.java:115)
	at com.mongodb.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:116)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.net.ConnectException: Connection refused (Connection refused)
	at java.net.PlainSocketImpl.socketConnect(Native Method)
	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
	at java.net.Socket.connect(Socket.java:589)
	at com.mongodb.connection.SocketStreamHelper.initialize(SocketStreamHelper.java:50)
	at com.mongodb.connection.SocketStream.open(SocketStream.java:58)
	... 3 more
Jul 19, 2019 2:33:13 PM com.mongodb.diagnostics.logging.JULLogger log
INFO: No server chosen by ReadPreferenceServerSelector{readPreference=primary} from cluster description ClusterDescription{type=UNKNOWN, connectionMode=SINGLE, serverDescriptions=[ServerDescription{address=127.0.0.1:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketOpenException: Exception opening socket}, caused by {java.net.ConnectException: Connection refused (Connection refused)}}]}. Waiting for 30000 ms before timing out

Slugify is not robust

There are several possible languages and content in an article title that util/slugify will not handle well.

Should probably just "hydrate" page content on write

Currently mango hydrates page content (renders markdown to html) on read. But we probably should just hydrate on write, and write both the markdown and the html to the database. Then on read, just read the html.

Parameters like page and per-page should be converted to ints earlier

e.g.

(defn blog-articles-by-query
  "Query blog articles"
  [query {:keys [page per-page] :or {page 1 per-page default-per-page}}]
  (mq/with-collection @DB config/db-article-collection
    (mq/find query)
    (mq/sort {:created -1})
    (mq/paginate :page (Integer. page) :per-page (Integer. per-page))))

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.