-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Add API endpoints for uploading talk data and images
- Loading branch information
Showing
44 changed files
with
384 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import mongoose from "mongoose" | ||
|
||
export const activitySchama = new mongoose.Schema({ | ||
userid: { | ||
type: String, | ||
}, | ||
activity: { | ||
type: String, | ||
required: true, | ||
enum: ["login", "logout", "register", "delete", "update","accept","group","block","create","delete","flag","ignore","invite","join","read","req","talk","update"], | ||
}, | ||
activityObject: { | ||
type: Object, | ||
required: true, | ||
}, | ||
timestamp: { type: Date, default: Date.now, expires: 60 * 60 * 24 }, | ||
}) | ||
const activity = mongoose.model("activity", activitySchama) | ||
export default activity |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import mongoose from "mongoose" | ||
|
||
export const friendConfigSchama = new mongoose.Schema({ | ||
userid: { | ||
type: String, | ||
required: true, | ||
unique: true, | ||
}, | ||
addFriendById: { | ||
type: Boolean, | ||
required: true, | ||
}, | ||
blockUsers: [String], | ||
allowOtherServerUsers: { | ||
type: Boolean, | ||
required: true, | ||
}, | ||
}) | ||
const friendConfig = mongoose.model("friendconfig", friendConfigSchama) | ||
export default friendConfig |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
// | ||
//サーバーをブロックする | ||
//POST /api/v2/client/block/server | ||
// { domain: string, csrftoken: string } | ||
// -> { status: boolean, message: string } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
//ユーザーをブロックする | ||
//POST: /api/v2/client/block/user | ||
// { userid: string, csrftoken: string } | ||
// -> { status: boolean, message: string } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
//csrftokenを発行 | ||
// GET /api/v2/client/csrftoken | ||
// -> { status: boolean, message: string, csrftoken: string } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
//友達のアイコンを取得 | ||
// GET /api/v2/client/friends/info/:id/icon/friend | ||
// { uuid: string } | ||
// -> { status: boolean, message: string, icon: any } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
//addfriendkeyを利用してフレンドのアイコンを取得する | ||
// GET /api/v2/client/friends/info/:id/icon/friend | ||
// { addFriendKey: string } | ||
// -> { status: boolean, message: string, icon: any } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
//グループチャットの友達のアイコンを取得する | ||
// GET /api/v2/client/friends/info/:id/icon/group | ||
// { groupid: string, uuid: string } | ||
// -> { status: boolean, message: string, icon: any } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
//友達のプロフィールを取得 | ||
// GET /api/v2/client/friends/info/:id/profile/friend | ||
// { uuid: string, requirement: object } | ||
// -> { status: boolean, message: string, profile: Profile } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
//フレンドコードを使用してプロフィールを取得する | ||
// GET /api/v2/client/friends/info/:id/profile/friendcode | ||
// { addFriendKey: string } | ||
// -> { status: boolean, message: string, profile: Profile } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
//グループのメンバーの情報を取得 | ||
// GET /api/v2/client/friends/info/:id/profile/group | ||
// { groupid: string, uuid: string } | ||
// -> { status: boolean, message: string, profile: Profile } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
//友達の情報のオブジェクトを配列で返す | ||
//GET /api/v2/client/friends/list | ||
// -> { status: boolean, message: string, friends: [{userName, nickName,latestMessage,latestMessageTime}] } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
//websocket |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
//ログインしてcookieをセットする | ||
// POST /api/v2/client/sessions/login | ||
// { email?: string, userName?: string, password: string} | ||
// -> { status: boolean, message: string } cookie: sessionid=string; path=/; max-age=number; httpOnly; SameSite=Strict; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
//sessionidを削除してcookieを削除する | ||
// POST /api/v2/client/sessions/logout | ||
// -> { status: boolean, message: string } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
//本登録するapi | ||
//POST /api/v2/client/sessions/registers/auth | ||
// { email: string, password: string, nickName: string,age: string, token: string, recaptcha: string } | ||
// -> { status: boolean, message: string } |
Oops, something went wrong.