mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 18:44:16 +00:00
renamed typo
This commit is contained in:
parent
4b264e71d3
commit
8688f5383f
@ -157,7 +157,7 @@ class ComtyApp extends React.Component {
|
||||
|
||||
static publicMethods = {
|
||||
controls: {
|
||||
toogleUIVisibility: (to) => {
|
||||
toggleUIVisibility: (to) => {
|
||||
if (app.layout.sidebar) {
|
||||
app.layout.sidebar.toggleVisibility(to)
|
||||
}
|
||||
|
@ -80,7 +80,7 @@ export class AudioPlayer extends React.Component {
|
||||
}
|
||||
|
||||
onClickLikeButton = async () => {
|
||||
const result = await PlaylistsModel.toogleTrackLike(this.context.currentManifest._id).catch((err) => {
|
||||
const result = await PlaylistsModel.toggleTrackLike(this.context.currentManifest._id).catch((err) => {
|
||||
return null
|
||||
})
|
||||
|
||||
|
@ -602,7 +602,7 @@ export default class SyncLyrics extends React.Component {
|
||||
})
|
||||
|
||||
if (app.layout.sidebar) {
|
||||
app.controls.toogleUIVisibility(false)
|
||||
app.controls.toggleUIVisibility(false)
|
||||
}
|
||||
|
||||
app.cores.style.compactMode(true)
|
||||
@ -643,7 +643,7 @@ export default class SyncLyrics extends React.Component {
|
||||
delete window._hacks
|
||||
|
||||
if (app.layout.sidebar) {
|
||||
app.controls.toogleUIVisibility(true)
|
||||
app.controls.toggleUIVisibility(true)
|
||||
}
|
||||
|
||||
app.cores.style.compactMode(false)
|
||||
|
@ -55,7 +55,7 @@ export default (props) => {
|
||||
}
|
||||
|
||||
const handleTrackLike = async (track) => {
|
||||
return await PlaylistsModel.toogleTrackLike(track._id)
|
||||
return await PlaylistsModel.toggleTrackLike(track._id)
|
||||
}
|
||||
|
||||
const makeSearch = (value) => {
|
||||
|
@ -29,14 +29,14 @@ export default class FollowsModel {
|
||||
return response.data
|
||||
}
|
||||
|
||||
static toogleFollow = async ({ user_id, username }) => {
|
||||
static toggleFollow = async ({ user_id, username }) => {
|
||||
if (!user_id && !username) {
|
||||
throw new Error("user_id or username is required")
|
||||
}
|
||||
|
||||
const response = await request({
|
||||
method: "POST",
|
||||
url: "/follow/user/toogle",
|
||||
url: "/follow/user/toggle",
|
||||
data: {
|
||||
user_id: user_id,
|
||||
username: username
|
||||
|
@ -108,7 +108,7 @@ export default class PlaylistsModel {
|
||||
return data
|
||||
}
|
||||
|
||||
static toogleTrackLike = async (track_id) => {
|
||||
static toggleTrackLike = async (track_id) => {
|
||||
if (!track_id) {
|
||||
throw new Error("Track ID is required")
|
||||
}
|
||||
|
@ -118,27 +118,27 @@ export default class Post {
|
||||
return data
|
||||
}
|
||||
|
||||
static toogleLike = async ({ post_id }) => {
|
||||
static toggleLike = async ({ post_id }) => {
|
||||
if (!post_id) {
|
||||
throw new Error("Post ID is required")
|
||||
}
|
||||
|
||||
const { data } = await request({
|
||||
method: "POST",
|
||||
url: `/posts/${post_id}/toogle_like`,
|
||||
url: `/posts/${post_id}/toggle_like`,
|
||||
})
|
||||
|
||||
return data
|
||||
}
|
||||
|
||||
static toogleSave = async ({ post_id }) => {
|
||||
static toggleSave = async ({ post_id }) => {
|
||||
if (!post_id) {
|
||||
throw new Error("Post ID is required")
|
||||
}
|
||||
|
||||
const { data } = await request({
|
||||
method: "POST",
|
||||
url: `/posts/${post_id}/toogle_save`,
|
||||
url: `/posts/${post_id}/toggle_save`,
|
||||
})
|
||||
|
||||
return data
|
||||
|
@ -6,12 +6,13 @@ import unfollowUser from "../services/unfollowUser"
|
||||
|
||||
export default {
|
||||
method: "POST",
|
||||
route: "/user/toogle",
|
||||
route: "/user/toggle",
|
||||
middlewares: ["withAuthentication"],
|
||||
fn: Schematized({
|
||||
select: ["user_id", "username"],
|
||||
}, async (req, res) => {
|
||||
const selfUserId = req.user._id.toString()
|
||||
|
||||
let targetUserId = null
|
||||
let result = null
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Post, } from "@models"
|
||||
import toogleLike from "../../PostsController/services/toogleLike"
|
||||
import toggleLike from "../../PostsController/services/toggleLike"
|
||||
|
||||
export default {
|
||||
method: "POST",
|
||||
@ -28,7 +28,7 @@ export default {
|
||||
for (let i = 0; i < count; i++) {
|
||||
const mokUserId = `mok_${i}_${count}`
|
||||
|
||||
toogleLike({
|
||||
toggleLike({
|
||||
post_id: postData._id.toString(),
|
||||
user_id: mokUserId,
|
||||
to: true
|
||||
|
@ -3,7 +3,7 @@ import { ToogleLike } from "../services"
|
||||
|
||||
export default {
|
||||
method: "POST",
|
||||
route: "/:post_id/toogle_like",
|
||||
route: "/:post_id/toggle_like",
|
||||
middlewares: ["withAuthentication"],
|
||||
fn: Schematized({
|
||||
select: ["to"],
|
||||
|
@ -2,7 +2,7 @@ import { ToogleSavePost } from "../services"
|
||||
|
||||
export default {
|
||||
method: "POST",
|
||||
route: "/:post_id/toogle_save",
|
||||
route: "/:post_id/toggle_save",
|
||||
middlewares: ["withAuthentication"],
|
||||
fn: async (req, res) => {
|
||||
const post = await ToogleSavePost({
|
||||
|
@ -1,6 +1,6 @@
|
||||
export { default as CreatePost } from "./createPost"
|
||||
export { default as ToogleLike } from "./toogleLike"
|
||||
export { default as ToogleSavePost } from "./tooglePostSave"
|
||||
export { default as ToogleLike } from "./toggleLike"
|
||||
export { default as ToogleSavePost } from "./togglePostSave"
|
||||
|
||||
export { default as GetPostData } from "./getPostData"
|
||||
export { default as DeletePost } from "./deletePost"
|
||||
|
Loading…
x
Reference in New Issue
Block a user