Skip to content

Commit

Permalink
chore: Add API endpoints for uploading talk data and images
Browse files Browse the repository at this point in the history
  • Loading branch information
tako0614 committed Jul 6, 2024
1 parent 5be4e0e commit 0382e1a
Show file tree
Hide file tree
Showing 92 changed files with 235 additions and 4,385 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
node_modules/
# Fresh build directory
_fresh/
files/
files/
old.env
4 changes: 2 additions & 2 deletions models/activity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const activitySchama = new mongoose.Schema({
activity: {
type: String,
required: true,
enum: ["login", "logout", "register", "delete", "update","accept","group","block","create","delete","flag","ignore","invite","join","read","req","talk","update"],
enum: ["login", "logout", "register", "delete", "update", "accept", "group", "block", "create", "delete", "flag", "ignore", "invite", "join", "read", "req", "talk", "update"],
},
activityObject: {
type: Object,
Expand All @@ -16,4 +16,4 @@ export const activitySchama = new mongoose.Schema({
timestamp: { type: Date, default: Date.now, expires: 60 * 60 * 24 },
})
const activity = mongoose.model("activity", activitySchama)
export default activity
export default activity
20 changes: 0 additions & 20 deletions models/friendconfig.ts

This file was deleted.

41 changes: 41 additions & 0 deletions models/userConfig.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import mongoose from "mongoose"

export const friendConfigSchama = new mongoose.Schema({
userid: {
type: String,
required: true,
unique: true,
},
addFriendById: {
type: Boolean,
required: true,
},
blockUsers: {
type: [String],
required: true,
validate: {
validator: function(v: string[]) {
const unique = new Set(v);
return unique.size === v.length;
},
message: (props: { value: any }) => `${props.value} contains duplicate entries!`
}
},
blockServers: {
type: [String],
required: true,
validate: {
validator: function(v: string[]) {
const unique = new Set(v);
return unique.size === v.length;
},
message: (props: { value: any }) => `${props.value} contains duplicate entries!`
}
},
allowOtherServerUsers: {
type: Boolean,
required: true,
},
})
const friendConfig = mongoose.model("friendconfig", friendConfigSchama)
export default friendConfig
229 changes: 0 additions & 229 deletions routes/api/v1/chats/friendList.ts

This file was deleted.

Loading

0 comments on commit 0382e1a

Please sign in to comment.