Giter Club home page Giter Club logo

cozy-api's Introduction

cozy-nyc

env file needed for /backend

DATABASE_URL=postgres://cozy:comfy123@localhost/cozy

command to run in docker

docker build -t comfy .

cozy-api's People

Contributors

dependabot[bot] avatar nobodyhere2see avatar s1mb10t3 avatar

Watchers

 avatar  avatar

cozy-api's Issues

Updates need for Boards

A few changes are needed for boards.

  1. /boards/board/<tag> should return only a list of active threads. Currently the api call sends a list of all the threads on the site with active threads as it's own field. The api call is better off sending a list of threads that are active and/or locked. I recommened creating a call 'boards/boards//fulldetail` that shows all threads.

  2. Threads should have a updated model that starts off equal to the created but when a post is made update will reflect the date that the post was made. List of threads should also be order by updated in descending order.

  3. Error when creating a thread. I only notice this on my version of the repo on testing. @nobodyhere2see can you confirm if the issue happens to you.
    screenshots

There's somemore changes needed but can't test without the ability to create a thread(RIP)

Profile Locations

Locations should be a list instead of a text input.

Locations:

  • Brooklyn
  • Queens
  • Manhattan
  • Bronx
  • Staten Island
  • Greater NYC Area
  • Nowhere
  • The Moon

Update need for Streams

Services should be a list to keep things simple for now for embed links.

  • YouTube
  • Twitch
  • Angelthump

Not sure if channel is necessary since streams are based on usernames

There needs to be a way for the live stream to automatically go live once a user starts streaming on one of the given platforms. Webhooks might solve this issue.

500 internal server error on certain api calls

Describe the bug
Different api requests lead to 500 internal server errors

To Reproduce
Steps to reproduce the behavior:
Routes for bad post requests

  1. Go to any of the following as a logged in admin: https://api.cozy.nyc/boards/thread/create https://api.cozy.nyc/boards/post/create
    https://api.cozy.nyc/exchange/transactions/create/
    https://api.cozy.nyc/exchange/item/create/
  2. Try filling out thread/post create form and submit
  3. See Server Error (500)

Routes for bad get requests:

  1. Go to https://api.cozy.nyc/exchange/info/
    https://api.cozy.nyc/boards/info/
  2. See Server Error (500)

Expected behavior
Should be able to successfully make all post requests and get requests, or at least encounter a 404 type error on post requests.

Reply to thread call

Creating a POST call with the follow parameter
/boards/thread/<threadid>/reply
that will create a post and automatically add it to the replies of the thread would make things a lot easier for the front end side of things. Will try to implement this.

Update README

With the project getting much bigger I believe an updated readme is necessary.

Adding photos and a more detailed "how to launch" as well as more details on the project as a whole are needed.

Just a whole README overhaul.

Options Field for Post

Add an optional field for posts so users can sage a post (create a post without bumping a thread).

I'll think of other options to add later.

Changes to API

Changes need to API calls.

General

Calling /info should return status of services (online or offline) and a message(Important Boolean)
Ignore Info for now

Boards

Calling /boards should return status of the service (online or offline), message(Important Boolean), list of active boards.
Active Boards should include name of board and tag

Calling /boards/list should return a list of all the boards on the site with details of amount of active threads, total amount of threads, amount of unique posters.

Calling /boards/<boardtag> should return a list of threads on that board, amount of active threads, total amount of threads, amount of unique posters
Thread info should include OP's image, a blurb of OP's post, post date, date of recent activity, OP user/profile.

Calling /boards/thread/create should create a thread

Calling /boards/thread/<threadID> should return OP's post and a list of replies, number of replies, creation date, date of last activity, list of users, number of unique posters, and list of images on this thread

Calling /boards/thread/<threadID>/reply should create a post on a thread.

Calling `/boards/thread/post/ should return details of a post.

Exchange

All api calls for exchange should start with /exchange/

Calling /exchange should return status of the service (online or offline), message(Important Boolean)

Stream

Calling /stream should return status of the service (online or offline), message(Important Boolean), and a list of ongoing livestreams.

Error Logs

While in production, django should send out any error logs to the admin emails, but I'm not able to get one.

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.