Skip to content

Commit 35dcdf3

Browse files
Update Profile & Delete Account
1 parent d7e0fed commit 35dcdf3

File tree

9 files changed

+282
-145
lines changed

9 files changed

+282
-145
lines changed

Codelink.postman_collection.json

+149-10
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@
3131
"formdata": [
3232
{
3333
"key": "name",
34-
"value": "eman",
34+
"value": "salah",
3535
"type": "text"
3636
},
3737
{
3838
"key": "email",
39-
"value": "emanelhelaly11@gmail.com",
39+
"value": "salah@gmail.com",
4040
"type": "text"
4141
},
4242
{
@@ -88,7 +88,7 @@
8888
"formdata": [
8989
{
9090
"key": "email",
91-
"value": "emanelhelaly11@gmail.com",
91+
"value": "salah@gmail.com",
9292
"type": "text"
9393
},
9494
{
@@ -1753,7 +1753,7 @@
17531753
"bearer": [
17541754
{
17551755
"key": "token",
1756-
"value": "4|6yeIAPv9TDs7cYlkXlLsa6GfzpiXXFwHxgEtWtZN",
1756+
"value": "1|khAolrPv8LpJ6yhpY3zwfXOrhOxpdqV07An5Tvu1",
17571757
"type": "string"
17581758
}
17591759
]
@@ -1771,23 +1771,115 @@
17711771
"type": "text"
17721772
}
17731773
],
1774+
"body": {
1775+
"mode": "formdata",
1776+
"formdata": []
1777+
},
1778+
"url": {
1779+
"raw": "http://localhost:8000/api/users/show/1",
1780+
"protocol": "http",
1781+
"host": [
1782+
"localhost"
1783+
],
1784+
"port": "8000",
1785+
"path": [
1786+
"api",
1787+
"users",
1788+
"show",
1789+
"1"
1790+
]
1791+
}
1792+
},
1793+
"response": []
1794+
},
1795+
{
1796+
"name": "users/updateProfile",
1797+
"request": {
1798+
"auth": {
1799+
"type": "bearer",
1800+
"bearer": [
1801+
{
1802+
"key": "token",
1803+
"value": "1|khAolrPv8LpJ6yhpY3zwfXOrhOxpdqV07An5Tvu1",
1804+
"type": "string"
1805+
}
1806+
]
1807+
},
1808+
"method": "POST",
1809+
"header": [
1810+
{
1811+
"key": "Accept",
1812+
"value": "application/json",
1813+
"type": "text"
1814+
},
1815+
{
1816+
"key": "Authorization",
1817+
"value": "application/json",
1818+
"type": "text"
1819+
}
1820+
],
17741821
"body": {
17751822
"mode": "formdata",
17761823
"formdata": [
17771824
{
1778-
"key": "email",
1779-
"value": "[email protected]",
1825+
"key": "name",
1826+
"value": "salaaa",
17801827
"type": "text"
17811828
},
17821829
{
1783-
"key": "password",
1784-
"value": "123123",
1830+
"key": "imageUrl",
1831+
"type": "file",
1832+
"src": []
1833+
},
1834+
{
1835+
"key": "track",
1836+
"value": "",
1837+
"type": "text"
1838+
},
1839+
{
1840+
"key": "bio",
1841+
"value": "",
1842+
"type": "text"
1843+
},
1844+
{
1845+
"key": "email_profile",
1846+
"value": "",
1847+
"type": "text"
1848+
},
1849+
{
1850+
"key": "cvUrl",
1851+
"value": "",
1852+
"type": "text"
1853+
},
1854+
{
1855+
"key": "githubUrl",
1856+
"value": "",
1857+
"type": "text"
1858+
},
1859+
{
1860+
"key": "linkedinUrl",
1861+
"value": "",
1862+
"type": "text"
1863+
},
1864+
{
1865+
"key": "behanceUrl",
1866+
"value": "",
1867+
"type": "text"
1868+
},
1869+
{
1870+
"key": "twitterUrl",
1871+
"value": "",
1872+
"type": "text"
1873+
},
1874+
{
1875+
"key": "facebookUrl",
1876+
"value": "",
17851877
"type": "text"
17861878
}
17871879
]
17881880
},
17891881
"url": {
1790-
"raw": "http://localhost:8000/api/users/show/1",
1882+
"raw": "http://localhost:8000/api/users/updateProfile/1",
17911883
"protocol": "http",
17921884
"host": [
17931885
"localhost"
@@ -1796,7 +1888,54 @@
17961888
"path": [
17971889
"api",
17981890
"users",
1799-
"show",
1891+
"updateProfile",
1892+
"1"
1893+
]
1894+
}
1895+
},
1896+
"response": []
1897+
},
1898+
{
1899+
"name": "users/deleteAccount",
1900+
"request": {
1901+
"auth": {
1902+
"type": "bearer",
1903+
"bearer": [
1904+
{
1905+
"key": "token",
1906+
"value": "1|khAolrPv8LpJ6yhpY3zwfXOrhOxpdqV07An5Tvu1",
1907+
"type": "string"
1908+
}
1909+
]
1910+
},
1911+
"method": "POST",
1912+
"header": [
1913+
{
1914+
"key": "Accept",
1915+
"value": "application/json",
1916+
"type": "text"
1917+
},
1918+
{
1919+
"key": "Authorization",
1920+
"value": "application/json",
1921+
"type": "text"
1922+
}
1923+
],
1924+
"body": {
1925+
"mode": "formdata",
1926+
"formdata": []
1927+
},
1928+
"url": {
1929+
"raw": "http://localhost:8000/api/users/deleteAccount/1",
1930+
"protocol": "http",
1931+
"host": [
1932+
"localhost"
1933+
],
1934+
"port": "8000",
1935+
"path": [
1936+
"api",
1937+
"users",
1938+
"deleteAccount",
18001939
"1"
18011940
]
18021941
}

app/Http/Controllers/Api/Auth/LoginController.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function login(LoginRequest $request)
5050
public function logout(Request $request)
5151
{
5252
$user = Auth::guard('sanctum')->user();
53-
// $user->currentAccessToken()->delete();
53+
$user->currentAccessToken()->delete();
5454
return ApiTrait::successMessage(__('Logout successful.'));
5555
}
5656
}

0 commit comments

Comments
 (0)