Renaming project to json-api for clarity sake
This commit is contained in:
parent
84c865e194
commit
b67bb6105f
25
json-api/.vscode/launch.json
vendored
Normal file
25
json-api/.vscode/launch.json
vendored
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
{
|
||||||
|
// Use IntelliSense to learn about possible attributes.
|
||||||
|
// Hover to view descriptions of existing attributes.
|
||||||
|
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "Python: Client Tests",
|
||||||
|
"type": "python",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${workspaceFolder}/client-tests/client.py",
|
||||||
|
"console": "integratedTerminal"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "lldb",
|
||||||
|
"request": "launch",
|
||||||
|
"name": "(Linux) Debug",
|
||||||
|
"program": "${workspaceFolder}/target/debug/freechat-server",
|
||||||
|
"args": [
|
||||||
|
"-s"
|
||||||
|
],
|
||||||
|
"cwd": "${workspaceFolder}"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
0
server-api/Cargo.lock → json-api/Cargo.lock
generated
0
server-api/Cargo.lock → json-api/Cargo.lock
generated
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "freechat-server"
|
name = "json-api"
|
||||||
version = "0.1.0"
|
version = "0.2.0"
|
||||||
authors = ["shockrah <alejandros714@protonmail.com>"]
|
authors = ["shockrah <alejandros714@protonmail.com>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
|
2
json-api/hmac.secret
Normal file
2
json-api/hmac.secret
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
bïò<EFBFBD>Cˆ'BIŸ‘¬%©b»jˆ]’<>Ž¥µH>ŒŒ$ °b¾ æúϦwÙY攘#ÂýÐ
|
||||||
|
4O¶>'ŸÉ“
|
54
json-api/src/schema.rs
Normal file
54
json-api/src/schema.rs
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
table! {
|
||||||
|
channels (id) {
|
||||||
|
id -> Unsigned<Bigint>,
|
||||||
|
name -> Varchar,
|
||||||
|
description -> Nullable<Varchar>,
|
||||||
|
kind -> Integer,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
table! {
|
||||||
|
invites (id) {
|
||||||
|
id -> Bigint,
|
||||||
|
uses -> Nullable<Bigint>,
|
||||||
|
expires -> Bool,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
table! {
|
||||||
|
jwt (id) {
|
||||||
|
id -> Unsigned<Bigint>,
|
||||||
|
token -> Varchar,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
table! {
|
||||||
|
members (id, secret) {
|
||||||
|
id -> Unsigned<Bigint>,
|
||||||
|
secret -> Varchar,
|
||||||
|
name -> Varchar,
|
||||||
|
joindate -> Bigint,
|
||||||
|
status -> Integer,
|
||||||
|
permissions -> Unsigned<Bigint>,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
table! {
|
||||||
|
messages (id) {
|
||||||
|
id -> Unsigned<Bigint>,
|
||||||
|
time -> Bigint,
|
||||||
|
content -> Varchar,
|
||||||
|
author_id -> Unsigned<Bigint>,
|
||||||
|
channel_id -> Unsigned<Bigint>,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
joinable!(messages -> channels (channel_id));
|
||||||
|
|
||||||
|
allow_tables_to_appear_in_same_query!(
|
||||||
|
channels,
|
||||||
|
invites,
|
||||||
|
jwt,
|
||||||
|
members,
|
||||||
|
messages,
|
||||||
|
);
|
Loading…
Reference in New Issue
Block a user