-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #307 from kSideProject/dev
dev 브랜치 main으로 병합
- Loading branch information
Showing
58 changed files
with
912 additions
and
483 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
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
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
5 changes: 1 addition & 4 deletions
5
core/src/main/kotlin/kpring/core/chat/chat/dto/response/EventType.kt
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,10 +1,7 @@ | ||
package kpring.core.chat.chat.dto.response | ||
|
||
enum class EventType(val type: String) { | ||
ENTER("ENTER"), | ||
INVITATION("INVITATION"), | ||
CREATED("CREATED"), | ||
CHAT("CHAT"), | ||
EXIT("EXIT"), | ||
EXPEL("EXPEL"), | ||
SYSTEM("SYSTEM"), | ||
} |
10 changes: 10 additions & 0 deletions
10
core/src/main/kotlin/kpring/core/chat/chatroom/dto/request/TransferChatRoomOwnerRequest.kt
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,10 @@ | ||
package kpring.core.chat.chatroom.dto.request | ||
|
||
import jakarta.validation.constraints.NotNull | ||
|
||
data class TransferChatRoomOwnerRequest( | ||
@field:NotNull | ||
val newOwnerId: String, | ||
@field:NotNull | ||
val chatRoomId: 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
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
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,48 @@ | ||
import axiosInstance from "./axiosInstance"; | ||
|
||
type FriendsType = { | ||
friendId: number; | ||
username: string; | ||
email: string; | ||
imagePath: string; | ||
}; | ||
|
||
type RequestFriendType = { | ||
userId: string; | ||
friends: FriendsType[]; | ||
}; | ||
|
||
export const requestFriend = async (token: string | null) => { | ||
const url = `${process.env.REACT_APP_BASE_URL}/user/api/v1/user/4/friend/2`; | ||
|
||
try { | ||
const response = await axiosInstance({ | ||
method: "post", | ||
url, | ||
headers: { | ||
Authorization: `Bearer ${token}`, | ||
}, | ||
}); | ||
console.log(response.data); | ||
return response.data as RequestFriendType; | ||
} catch (error) { | ||
console.log(error); | ||
} | ||
}; | ||
|
||
export const viewFriendRequest = async (token: string) => { | ||
const url = `${process.env.REACT_APP_BASE_URL}/user/api/v1/user/2/requests`; | ||
try { | ||
const response = await axiosInstance({ | ||
method: "get", | ||
url, | ||
headers: { | ||
Authorization: `Bearer ${token}`, | ||
}, | ||
}); | ||
|
||
return response.data; | ||
} catch (error) { | ||
console.log(error); | ||
} | ||
}; |
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
Oops, something went wrong.