GithubHelp home page GithubHelp logo

heyrict / cindy-next-rust Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 1.0 451 KB

The backend for [cindy-next](https://github.com/heyrict/cindy-next). Written in Rust.

Home Page: https://www.cindythink.com/

License: GNU General Public License v3.0

Rust 79.56% Shell 0.38% PLpgSQL 19.56% Dockerfile 0.31% Just 0.19%
diesel graphql graphql-server actix-web async-graphql realtime-chat realtime-collaboration cindy

cindy-next-rust's People

Contributors

heyrict avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

pb10005

cindy-next-rust's Issues

Postgres error occurred in setup

An error occurred while setting up postgres.
OS: Debian 10(buster) on VirtualBox(host OS: macOS Big Sur)

command I executed

sudo -u postgres psql cindy  -U cindy < setup/jp/initdb.up.sql 

error message

ERROR:  relation "chatroom" does not exist
LINE 1: INSERT INTO chatroom (name, description, user_id)
                    ^
ERROR:  relation "public.award" does not exist
Query buffer reset (cleared).
invalid command \n2.
Query buffer reset (cleared).
invalid command \n色んな称号を考案して、まさに名付けの親である。
Query buffer reset (cleared).
invalid command \n「BSって何?」と思った方は用語集をチェック!
Query buffer reset (cleared).
invalid command \n「外の世界に一体何が起きたんでしょうか?」
Query buffer reset (cleared).
invalid command \nATODUKEの「DUKE」が「公爵」を意味することから、この称号名になった。
Query buffer reset (cleared).
invalid command \nジャパネットシンディで最高売上を記録した彼の腕にかかれば、たとえゴミ捨て場に捨てられたゴミでさえ売り物にしてしまうことだろう。
Query buffer reset (cleared).
invalid command \n
invalid command \.
ERROR:  syntax error at or near "230"
LINE 1: 230 ★Cindy通(三年) 登録日から3年以上経過した後に1問以上出題...
        ^

Image uploading

Description

Images can be a bonus for creating lateral thinking puzzles. Generally users may want to use one or two images in a single puzzle.

Proposed solution

IMO, a table storing paths to pictures and uploaded users, file size, modification time, etc. should be created (one-to-many relationship between user and images may be sufficient in this case), thus alternation in the database is required.
Database alternation is done by files in the migrations folder, created with diesel migration generate. See files there as an example.

The graphql endpoint for uploading files is implemented in async-graphql, documented here.

Alternative solutions

Adding an optional field in puzzle table may allow user to use up to one picture, associated with the puzzle. This could be easier to implement with the cost of flexibility.

[ Feature Request ] Relay-like pagination

Hi,

I saw Relay-like pagination (not included) is planned on the Feature Roadmap. Any plan to make this happen?

I am building a GraphQL server in Rust using async-graphql and having a hard time doing relay-like pagination. The only resource I found is:

If this repo supports Relay-like pagination, We will have more resources to follow.

Thanks.

[Security] Workflow workflow.yml is using vulnerable action actions/checkout

The workflow workflow.yml is referencing action actions/checkout using references v1. However this reference is missing the commit a6747255bd19d7a757dbdda8c654a9f84db19839 which may contain fix to the some vulnerability.
The vulnerability fix that is missing by actions version could be related to:
(1) CVE fix
(2) upgrade of vulnerable dependency
(3) fix to secret leak and others.
Please consider to update the reference to the action.

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.