Skip to content

Commit

Permalink
Deployed 5b3d3d8 with MkDocs version: 1.5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
dunossauro committed Nov 29, 2023
1 parent a2754ff commit f08e225
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 20 deletions.
12 changes: 6 additions & 6 deletions 05/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1253,12 +1253,12 @@ <h3 id="modificando-o-endpoint-de-atualizacao-de-usuarios">Modificando o endpoin
<a id="__codelineno-10-12" name="__codelineno-10-12" href="#__codelineno-10-12"></a> <span class="k">if</span> <span class="n">db_user</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
<a id="__codelineno-10-13" name="__codelineno-10-13" href="#__codelineno-10-13"></a> <span class="k">raise</span> <span class="n">HTTPException</span><span class="p">(</span><span class="n">status_code</span><span class="o">=</span><span class="mi">404</span><span class="p">,</span> <span class="n">detail</span><span class="o">=</span><span class="s1">'User not found'</span><span class="p">)</span>
<a id="__codelineno-10-14" name="__codelineno-10-14" href="#__codelineno-10-14"></a>
<a id="__codelineno-10-15" name="__codelineno-10-15" href="#__codelineno-10-15"></a> <span class="n">current_user</span><span class="o">.</span><span class="n">username</span> <span class="o">=</span> <span class="n">user</span><span class="o">.</span><span class="n">username</span>
<a id="__codelineno-10-16" name="__codelineno-10-16" href="#__codelineno-10-16"></a><span class="hll"> <span class="n">current_user</span><span class="o">.</span><span class="n">password</span> <span class="o">=</span> <span class="n">get_password_hash</span><span class="p">(</span><span class="n">user</span><span class="o">.</span><span class="n">password</span><span class="p">)</span>
</span><a id="__codelineno-10-17" name="__codelineno-10-17" href="#__codelineno-10-17"></a> <span class="n">current_user</span><span class="o">.</span><span class="n">email</span> <span class="o">=</span> <span class="n">user</span><span class="o">.</span><span class="n">email</span>
<a id="__codelineno-10-15" name="__codelineno-10-15" href="#__codelineno-10-15"></a> <span class="n">db_user</span><span class="o">.</span><span class="n">username</span> <span class="o">=</span> <span class="n">user</span><span class="o">.</span><span class="n">username</span>
<a id="__codelineno-10-16" name="__codelineno-10-16" href="#__codelineno-10-16"></a><span class="hll"> <span class="n">db_user</span><span class="o">.</span><span class="n">password</span> <span class="o">=</span> <span class="n">get_password_hash</span><span class="p">(</span><span class="n">user</span><span class="o">.</span><span class="n">password</span><span class="p">)</span>
</span><a id="__codelineno-10-17" name="__codelineno-10-17" href="#__codelineno-10-17"></a> <span class="n">db_user</span><span class="o">.</span><span class="n">email</span> <span class="o">=</span> <span class="n">user</span><span class="o">.</span><span class="n">email</span>
<a id="__codelineno-10-18" name="__codelineno-10-18" href="#__codelineno-10-18"></a> <span class="n">session</span><span class="o">.</span><span class="n">commit</span><span class="p">()</span>
<a id="__codelineno-10-19" name="__codelineno-10-19" href="#__codelineno-10-19"></a> <span class="n">session</span><span class="o">.</span><span class="n">refresh</span><span class="p">(</span><span class="n">current_user</span><span class="p">)</span>
<a id="__codelineno-10-20" name="__codelineno-10-20" href="#__codelineno-10-20"></a> <span class="k">return</span> <span class="n">current_user</span>
<a id="__codelineno-10-19" name="__codelineno-10-19" href="#__codelineno-10-19"></a> <span class="n">session</span><span class="o">.</span><span class="n">refresh</span><span class="p">(</span><span class="n">db_user</span><span class="p">)</span>
<a id="__codelineno-10-20" name="__codelineno-10-20" href="#__codelineno-10-20"></a> <span class="k">return</span> <span class="n">db_user</span>
</code></pre></div>
<p>Assim, a atualização de um <code>User</code>, via método <code>PUT</code>, também criará o hash da senha no momento da atualização. Pois, nesse caso em específico, existe a possibilidade de alterar qualquer coluna da tabela, inclusive o campo <code>password</code>.</p>
<h4 id="sobre-os-testes-da-put-usersuser_id">Sobre os testes da PUT /users/{user_id}</h4>
Expand Down Expand Up @@ -1652,7 +1652,7 @@ <h2 id="conclusao">Conclusão</h2>
<small>

Última atualização:
<span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-date">November 7, 2023</span>
<span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-date">November 29, 2023</span>


</small>
Expand Down
2 changes: 1 addition & 1 deletion search/search_index.json

Large diffs are not rendered by default.

26 changes: 13 additions & 13 deletions sitemap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,67 +2,67 @@
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://fastapidozero.dunossauro.com/</loc>
<lastmod>2023-11-28</lastmod>
<lastmod>2023-11-29</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://fastapidozero.dunossauro.com/01/</loc>
<lastmod>2023-11-28</lastmod>
<lastmod>2023-11-29</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://fastapidozero.dunossauro.com/02/</loc>
<lastmod>2023-11-28</lastmod>
<lastmod>2023-11-29</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://fastapidozero.dunossauro.com/03/</loc>
<lastmod>2023-11-28</lastmod>
<lastmod>2023-11-29</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://fastapidozero.dunossauro.com/04/</loc>
<lastmod>2023-11-28</lastmod>
<lastmod>2023-11-29</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://fastapidozero.dunossauro.com/05/</loc>
<lastmod>2023-11-28</lastmod>
<lastmod>2023-11-29</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://fastapidozero.dunossauro.com/06/</loc>
<lastmod>2023-11-28</lastmod>
<lastmod>2023-11-29</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://fastapidozero.dunossauro.com/07/</loc>
<lastmod>2023-11-28</lastmod>
<lastmod>2023-11-29</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://fastapidozero.dunossauro.com/08/</loc>
<lastmod>2023-11-28</lastmod>
<lastmod>2023-11-29</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://fastapidozero.dunossauro.com/09/</loc>
<lastmod>2023-11-28</lastmod>
<lastmod>2023-11-29</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://fastapidozero.dunossauro.com/10/</loc>
<lastmod>2023-11-28</lastmod>
<lastmod>2023-11-29</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://fastapidozero.dunossauro.com/11/</loc>
<lastmod>2023-11-28</lastmod>
<lastmod>2023-11-29</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://fastapidozero.dunossauro.com/12/</loc>
<lastmod>2023-11-28</lastmod>
<lastmod>2023-11-29</lastmod>
<changefreq>daily</changefreq>
</url>
</urlset>
Binary file modified sitemap.xml.gz
Binary file not shown.

0 comments on commit f08e225

Please sign in to comment.