feat: Implement token-based authentication for user data endpoints.
This commit is contained in:
@@ -10,7 +10,11 @@ function App() {
|
||||
useEffect(() => {
|
||||
if (!token) return;
|
||||
|
||||
fetch("/api")
|
||||
fetch("/api", {
|
||||
headers: {
|
||||
Authorization: `Bearer ${token}`,
|
||||
},
|
||||
})
|
||||
.then((res) => res.arrayBuffer())
|
||||
.then((buffer) => {
|
||||
const list = PersonList.decode(new Uint8Array(buffer));
|
||||
|
||||
Reference in New Issue
Block a user